Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Site with many css???? View modes: 
User avatar
Member
Member
navas13-gmail - 8/8/2010 10:19:39 PM
   
Site with many css????
hi,

is posible that i have more than 1 css on my site, i need to create 2 or more css on my kentico, and i need to use one for one pages and the other on the others, is posible to do that, how??


thks


Daniel Navas

User avatar
Member
Member
Homer J. Simpson - 8/9/2010 1:13:53 AM
   
RE:Site with many css????
Hey,

You can create a style sheets in the Site Manager ~ Development ~ CSS Style sheets. Then you can specify what style sheet should be used for what document in the CMS Desk ~ Content ~ {some document} ~ Properties ~ General section.

See also:
http://devnet.kentico.com/docs/devguide/index.html?css_overview.htm
http://devnet.kentico.com/docs/devguide/index.html?document_properties_general.htm


Cheers,
HJS

User avatar
Member
Member
Armysniper89 - 8/9/2010 1:49:53 PM
   
RE:Site with many css????
You can also define the CSS in the Master Page template of the ROOT. Just add it to the header section and then it is loaded on all of your pages that use the Root master.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 8/10/2010 2:24:39 AM
   
RE:Site with many css????
Hello.

You can also link some stylesheet (from external file too) in CMSDesk -> Content -> select document -> Properties -> Template -> Edit template properties -> Header tab.

Best Regards,
Radek Macalik

User avatar
Member
Member
Mike Hearfield - 9/2/2010 3:08:13 AM
   
RE:Site with many css????
Hi, is it possible to set something so that the CSS varies by user? Some sort of BrandID or ThemeID stored against the user (once they've logged in of course), for example?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/2/2010 5:38:33 AM
   
RE:Site with many css????
Hi,

you can add a custom field to system table cms.user (Site Manager - Development - System table). In this example I used simple Editable text field and inserted path to css into it (in real word you can use same dropdown list - if name of css file will be changed, you can simply edit dropdown list value part).

Now you can insert Head HTML code webpart into root document. In Properties of webpart - Content part - insert following code please:

<link type="text/css" rel="stylesheet" href="{%cmscontext.currentuser.css%}" />

where css is name of my custom field.

Best regards,
Ivana Tomanickova