Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • pressmar Friend
    #199487

    Hello,

    as you can see on http://test.pressmar.de/chp i’d like to build a page with two sections “CHP-TAX” and “CHP-LAW” which i wanted to have done with two separate styles from ja_biz. to make the css.overrides in the custom.css just be valid for one style i need to add a css class maybe “chp_tax” right after the beginning of the body section.

    if i use the template- custom code after <head> field with e.g. <div class=”chp_law”> the body gets the right class which i could adress in custom.css. But this custom code field is global = it can’t be change for the different styles. Is the a way to add such a style sensetiv css-class without hard-coding it anywhere (this would be overriden during the normal template updates).

    kindest regards
    oliver

    swissa Friend
    #541424

    Not fully understanding what you want.

    You want different classes based on menĂ¼ items?

    If so, you can use page class suffix.

    http://docs.joomla.org/Page_Class_Suffix
    http://crosstown.coolestguidesontheplanet.com/joomla/adding-css-class-to-joomla-pages
    http://www.joomlabamboo.com/blog/how-to-joomla/how-to-use-the-page-class-suffix-in-joomla

    Hope that helps

    pressmar Friend
    #541428

    Hello Swissa,

    thank you for your post. no i want a different class right after in the beginning <body> for different template styles. so the specific class does work for every module even in the header. if i add the page-class for menu-items the class will be under:

    <body>
    <div class=”t3-wrapper”>
    <div class=”main-container”>
    <div class=”row”>
    <div id=”k2Container” class=”itemView chp_tax_pageclass”>

    if i add the class in the – what a pity global – section in template>custom fields it will be added much higher under

    <body>
    <div class=”chp_tax_template”>

    Hope this makes my point more understandable.
    kindest regards
    oliver

    Adam M Moderator
    #541701

    HI Oliver,

    In this case, you can use template theme instead, assign each page with unique style, then switch to tab Theme and choose appropriate theme (please note that each theme comes with its own css files), more detail can be found here.

    pressmar Friend
    #541729

    Hello Adam,

    thanks for you answer. To make a special template theme is one option but you still have to hardcode and adjust a lot of files (css, less, images aso.). I found a perfectly easy way to do it.

    I made two copies of the template layout e.g. default.php in tpls like default_law.php and default_tax.php and simply added the chp_law oder chp_tax class in row 33

    <div class=”t3-wrapper chp_law”> or
    <div class=”t3-wrapper chp_tax”>

    So i can simply use the custom.css overide in one file to make all changes there.

    Thanks for all the help. Maybe my solution is suitable for others.

    best regards
    oliver

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 3 voices, and was last updated by  pressmar 10 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum