Tuesday, May 27, 2008

"This item cannot be deleted because it is still referenced by other pages"

Hey,
I created some master pages to change the layout of my site with some content types with different page layouts.
After some time i got finalized my site layout. Now i thought that i should remove the garbage data from site like other content types, master page and page layout. So i prefer to go into SPD(Sharepoint Designer) and press delete button after selected item. What is this!!!!
"This item cannot be deleted because it is still referenced by other pages"
I thought might be on my site somewhere i am using these things so i did double check for everything and try again but its kick my a** again with the same error message.

Then again i went to great GOD google and found this is most popular error message when you are going to delete you content type, Master page and page layout etc and also get solution there. So to help you guys i am written the same thing here.

Steps:-
1. Create a new sub-folder in the masterpage document library.
2. Move the master page to the new folder (I did this by using SharePoint Designer)
3. Just delete the complete folder.
Yup, my master page finally gone from the document library!!!

You will feel relax after this if you had created a lot of sample items in you site.

Monday, May 26, 2008

Create your own Master Page (Minimal)...

Hey Guys,

If you search something about master page for SharePoint site, you will find out thousand of blogs upon it. As i did in my starting phase. I was neither a good developer so that i can create master page in Visual Studio nor i was good in sharepoint customization. so i was just looking for easiest way by which i can create my own master. Even i didn't know abc of designing also. So you can say just a blank paper on which i want to write down something. So finally i got a great blogger which makes my life easier from that day at least in sharepoint designing. That is only one Kyle Schaeffer. I just did whatever he told me to do for design a master page. The best thing of his blog was that he provide Minimal master page code with Core.css and one sample Demo Master page code with it's Demo.css file that made things easy for me.

So as usual for beginners i will explain the Master page design step by step so that nobody need to struggle with this as much i did.

Here are the steps:-

1. Open your Site in SharePoint Designer like http://myserver/ or http://myserver:port/ .
2. Open _catalogs folder from the root of the site.
3. Open Masterpage document library. You can see all masterpages of your site collection here.
4. Now go to File Menu->New-> Sharepoint Content->Page tab->MasterPage then ok. Like:-






5. Now you get a Untitled page1 with some line of HTML code. Don't bother about these lines just delete all the lines.
6.Copy this Minimal Master Page Code from here provided by Kyle and paste in your page HTML code.
7. Now Copy the code of Core.css from here and paste in your folder/library where you want just by creating a Core.css file. You can use default Core.css if you don't want to customize it at the first glance but at least you need to customize it for better look and feel. Please don't modify existing Core.css file otherwise you will not able to revert back.
(Note that you must override the default core.css file in order for this to work properly. The best way to do this is to programmatically override the "SharePoint:CssLink" control, but if you need a quick fix, you can simply customize the "core.css" file for each site in your site collection. Do this using the "Manage Styles" task pane in SharePoint Designer. Just double-click on any style that begins with ".ms" and then replace the entire contents of core.css with the contents of CoreCss.txt) .
8. Just Save the Page with appropriate name and publish it as a major version (when you do Check-In then it will ask for this). If it will ask for approval then do complete the process otherwise the contents will be not available for all users.
9. Now go to the site (Browser). Here Site Actions->Site Sittings->Modify all site settings.
10. Under Look and Feel you will see Master Page. Click on this and select the master page whatever you create. Click OK.
11. Come the home page and see you had your master page dude!!!!


If you want to use Kyle's Demo Master page for your design then use it's Master Page Code and it's Demo.css file.

I think guys it will help out you a lot.


I would like to here your comments!!!

Sunday, May 25, 2008

No Template is available except Publishing Site!!!

Hi,

I had created new site collection using publishing template on my fresh farm server installation. Now i want to create a new subsite under this site collection like a "Helpdesk" using template providing by microsoft (40 favorite http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx.)

You know i am the expert for these things so i just go blindly on site setting -> create new site...

What is this !!!!! there is no template except the publishing template not even team site, workspace nothing. I just kicked out myself.

Then i did workaround for that and found i didn't activate features on the site collection like Standard Site Collection features, Enterprise Site Collection features blah blah...

Not even i did upload and activate the custom site template provided by Microsoft.

After doing these things i feel little bit relax because i got everything what i want to create as a subsite and stop to say that i am expert for these things.