First of all, I just wanted to say what a great product and also if you could bear with me as im very new to umbraco and web design its self to be fair.
Im building a site using umbraco 4 http://dev.abcnet.co.uk/connectivity/broadband.aspx adapting the CWS package.. most of the information is held in a master template and Insert general content via a two colum template that references the master template. However different pages will need to select a different style sheet. is there anyway to add the style sheet to be used via the two colum page template im using so it then inserts it in to the master template?
I hope that makes sense... as mentioned before I am new to umbraco so if this can be done it would be appreciated if the answer could be done in a noob format :)
Then in your two column master template add the following
<asp:Content ContentPlaceHolderID="headerLinksContent" runat="server"> <!-- Insert your CSS link here or JS or anything else you want shoved in the head that is unique to this template --> </asp:Content>
<asp:Content ContentPlaceHolderID="headSection"runat="server"> <!-- Insert your CSS link here or JS or anything else you want shoved in the head that is unique to this template --> </asp:Content>
- to create a placeholder in the master template (in the head section, where the css declarations should go) -> to do so, use the insert content item placeholder dialog icon on the menu bar
- in you need to override the existing stylesheet from a master template, then you should place the master template's stylesheet in the placeholder, otherwise if the css file is to be included in all pages, do place it outside the placeholder tag, but still inside the head tag.
- in the 'child' template, add the placeholder you've defined on the master template (also insert dialog available from menu) and add the template's specific css file reference in there.
selecting a CSS file from a page
Hi All,
First of all, I just wanted to say what a great product and also if you could bear with me as im very new to umbraco and web design its self to be fair.
Im building a site using umbraco 4 http://dev.abcnet.co.uk/connectivity/broadband.aspx adapting the CWS package.. most of the information is held in a master template and Insert general content via a two colum template that references the master template. However different pages will need to select a different style sheet. is there anyway to add the style sheet to be used via the two colum page template im using so it then inserts it in to the master template?
I hope that makes sense... as mentioned before I am new to umbraco so if this can be done it would be appreciated if the answer could be done in a noob format :)
Many thanks for any help!
Lee
Yes lee this does make sense.
In your top level masterpage add the following in your <head> section
Then in your two column master template add the following
Oops bad copy/paste error there on my part !
The asp:content tag should read like this
Lee, best way to handle this is:
- to create a placeholder in the master template (in the head section, where the css declarations should go) -> to do so, use the insert content item placeholder dialog icon on the menu bar
- in you need to override the existing stylesheet from a master template, then you should place the master template's stylesheet in the placeholder, otherwise if the css file is to be included in all pages, do place it outside the placeholder tag, but still inside the head tag.
or
- in the 'child' template, add the placeholder you've defined on the master template (also insert dialog available from menu) and add the template's specific css file reference in there.
Hope this helps.
Regards,
/Dirk
Wow that was quick... thankyou so much guys!!! warren as one on your blog a few days back... nice site :)
Thankyou both, I will give it a shot later
Cheers Lee :)
is working on a reply...