-
AuthorPosts
-
pressmar Friend
pressmar
- Join date:
- March 2008
- Posts:
- 119
- Downloads:
- 14
- Uploads:
- 51
- Thanks:
- 25
- Thanked:
- 4 times in 1 posts
July 7, 2014 at 3:08 pm #199487Hello,
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
oliverswissa Friendswissa
- Join date:
- November 2011
- Posts:
- 1955
- Downloads:
- 7
- Uploads:
- 277
- Thanks:
- 175
- Thanked:
- 717 times in 572 posts
July 7, 2014 at 3:23 pm #541424Not 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-joomlaHope that helps
pressmar Friendpressmar
- Join date:
- March 2008
- Posts:
- 119
- Downloads:
- 14
- Uploads:
- 51
- Thanks:
- 25
- Thanked:
- 4 times in 1 posts
July 7, 2014 at 3:57 pm #541428Hello 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
oliverAdam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
pressmar Friendpressmar
- Join date:
- March 2008
- Posts:
- 119
- Downloads:
- 14
- Uploads:
- 51
- Thanks:
- 25
- Thanked:
- 4 times in 1 posts
July 9, 2014 at 11:46 am #541729Hello 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
oliver1 user says Thank You to pressmar for this useful post
-
AuthorPosts
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