-
AuthorPosts
-
January 25, 2017 at 1:01 pm #1005422
So here is the big question…
I want to create a website with 2 (or more) styles, these styles will have different menu colour and of course menu items. I know I can use custom.css file to override the settings given by a template and adjust styles using ThemeMagic but custom.css applies to all styles and I would like to use different custom.css for different styles.
I know I can use ThemeMagic but I would like to add some extras which ThemeMagic doesn’t have in the GUI. Is there any way I can simply assign single custom.css per each style so I can play with just like I did so far with the regular custom.css?Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 25, 2017 at 1:20 pm #1005435Hi
For this you have to create different theme to create different style. Each Theme will have their own style files .
After create a Theme compile Less to css from template options and the Theme css file will be created in the /local folder . Since the theme is custom you can directly apply you changes on them, also you can add custom.css file in the /css folder to define the new style codes For each theme.
RegardsJanuary 26, 2017 at 2:43 am #1005647Ok…
Kinda sad though. Would be good to implement a custom.css per style. Maybe worth to consider in Purity IV? 😛
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 26, 2017 at 3:45 am #1005659This reply has been marked as private.January 26, 2017 at 3:43 pm #1005897In head where?
In T3 framework there is a Custom Code where I can place additional and code but if I declare custom.css there it applies to all of the styles.
Found in /tpls/blocks line 47 but I don’t really know how to change the code to make it work so it would use separate custom.css for each style 🙁
Any help please?
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 26, 2017 at 4:24 pm #1005911Hi
As i suggested in my last post you can add custom.css file in each Theme folder, Beside if you want to use different custom.css file based on layout you have to define different head.php for each layout in tpls folder.
You can see custom.css file call is in head.phpRegards
January 26, 2017 at 4:37 pm #1005918Pankaj, thank you for your help and patience but allow me to explain myself in another way.
in head.php file I see this:
<?php // CUSTOM CSS if (is_file(T3_TEMPLATE_PATH . '/css/custom.css')) { $this->addStyleSheet(T3_TEMPLATE_URL . '/css/custom.css'); } ?>
Now… I would like to make it look like in this example:
<?php // CUSTOM CSS if (is_file(T3_TEMPLATE_PATH . '/css/themes' . /T3_STYLE_NAME . '/custom.css')) { $this->addStyleSheet(T3_TEMPLATE_URL . '/css' . T3_STYLE_NAME . '/custom.css'); } ?>
The question is: T3_STYLE_NAME doesn’t work/exist. Any other way to make it work? To change the code above so it would search for custom.css file for each style? I am not a PHP magician hence why I ask.
Hopefully it’s clear now 🙂 Once again – thank you for your help and patience
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 26, 2017 at 5:06 pm #1005928Hi
I am not sure what you want to achieve, i suggest you to check my suggestion given in this thr because i already explained everything to you.
Or you can show this thread to your developer who can check it for you.
RegardsJanuary 26, 2017 at 5:20 pm #1005932Nevermind… I did it just now:
<?php // CUSTOM CSS if (is_file(T3_TEMPLATE_PATH . '/css/' . $theme . '/custom.css')) { $this->addStyleSheet(T3_TEMPLATE_URL . '/css/' . $theme . 'custom.css'); } ?>
Now all I need is to: create a custom.css file in a folder /css/{theme_name}/custom.css and customise each style.
{theme_name} = orange, blue, default or own name etc…
-
AuthorPosts
This topic contains 10 replies, has 2 voices, and was last updated by sekijr 7 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum