Showing posts with label wcm. Show all posts
Showing posts with label wcm. Show all posts

Thursday, July 5, 2007

Adding a CSS File Link to a MasterPage

Use the following to add a reference to a stylesheet in a WCM publishing site's Style Library document library:

    <SharePointWebControls:CssRegistration ID="CssRegistration1" 
      name
="<% $SPUrl:~sitecollection/Style Library/style.css %>"
       runat="server"/>

Note that some of the default styles may still override those in the referenced stylesheet, so you may need to add the CSS as the Alternative CSS URL on the "Site Master Page Settings" form

Wednesday, July 4, 2007

Field Controls in a Layout Page not Displayed in Edit Mode

I was creating a new page layout associated with a content type that I had just modified (removed some fields and added others). SharePoint Designer showed the edit controls ocrrectly in the layout page.

But when I went to create a new page in the site using this page layout, only some of the field edit controls were displayed on the new page. No errors were displayed on the page, it was just failing to display some of the controls.

Tracked this is to the content types associated with the pages document library. Document libraries keep local copies of content types, so the pages library was storing the old set of fields for the content type I had changed. An important proviso here is that the custom content type that caused the problems is being modified through a feature rather than manually in the site settings pages. Perhaps if I had modified the content type directly rather than through a feature then the changes would have been propagated to the local copy of the content type in the document library?