0
votes

I created a copy(In SharePoint Designer) of my v4.master and I call it "NEW.master"..... all from the top level site.

I saved and I set the "NEW.master" as my default MasterPage for the site.

Then I go here http://MySiteName/_Layouts/ChangeSiteMasterPage.aspx and I make sure that it shows "NEW.master" in both drop downs and I set the check box for both to "Reset all sub-sites to inherit this site master page setting".

All fine and it works all good.

But then when I go back into SharePoint Designer I go to "~/_styles/corev4.css" and make some change to it.

All work fine for the home page but the CSS changes does not reflect onto my other Sites and sub-sites!! The MasterPage changes does reflect though.....

Any idea how/where to make my CSS changes to reflect on ALL my sites using my "NEW.master"??

What am I doing wrong???

2

2 Answers

0
votes

Are you logged in as Admin ? The CSS might needs to be checked in to reflect changes.

0
votes

Keeping it simple!

Enumerate all webs in the current site collection;

$collection = Get-SPSite http://localhost/
     foreach ($web in $collection.AllWebs) {
        $web | Select-Object -Property Title, Url, WebTemplate
     $web.Dispose()
     }
$collection.Dispose()

Title, Url and Template associated with each site / sub-site. A full list of template are available here.

I wrote a script to show all the available templates within your site and web as such;

$site = Get-SPSite http://localhost/
  $web = $site.OpenWeb("")
    Write-Host "Site: " + $site.id
    Write-Host "Web: " + $web.id
 $web.WebTemplate | Format-Table title, id -AutoSize
 $template = $web.GetAvailableWebTemplates(1033)
    Write-Host "Template: " + $template
  $web.Dispose()
$site.Dispose()

Templates are stored in the 12 / 14 hive under; C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\

Layout style sheets located; C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES

Modifying CSS associations can be done with Power Shell;

$web = Get-SPWeb http://localhost/
$web.AlternateCssUrl = "http://localhost/_layouts/styles/yourstyles.css"
$web.AllProperties["__InheritsAlternateCssUrl"] = $True
$web.Update()

Another way is to add a declarative tag into your Master Page as such;

<SharePoint:CssRegistration Name="/_styles/yourstyles.css" runat="server" EnableCssTheming="true" After="true"/>