-
AuthorPosts
-
johannesdach Friend
johannesdach
- Join date:
- August 2010
- Posts:
- 26
- Downloads:
- 2
- Uploads:
- 0
- Thanks:
- 8
- Thanked:
- 6 times in 1 posts
November 28, 2012 at 10:11 pm #182670Hey guys,
I generally understand that the templates are there to override the core joomla files, but what if I want to override the joomlart template which overrides the core files? I don’t want to edit the css files of the joomlart template because if I update or reinstall them they will be lost. Jreviews has this beautiful feature where you can set up a template folder and use a single “custom_styles.css” file which than overrides the jreviews main template IF there are custom styles while otherwise using the main template. Is there a simmilar option available for ja t3 themes?
Regards,Johannes
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
November 28, 2012 at 10:20 pm #474605What you need to do is set up Template overrides.
Template overrides are a good method for changing the way Joomla shows component and module output without changing the core Joomla system code. This is important because it means that as/when Joomla is upgraded to new versions, you will not have to repeat the changes you made.
Read more on Understanding Output Overrides
Also see: Layout Overrides in Joomla
Lastly, the Official HOW TO Override the Output from the Joomla Core
Hope some of this helps.
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
November 28, 2012 at 10:21 pm #474606Here is a video tutorial that may also be of assistance to you . . . .
johannesdach Friendjohannesdach
- Join date:
- August 2010
- Posts:
- 26
- Downloads:
- 2
- Uploads:
- 0
- Thanks:
- 8
- Thanked:
- 6 times in 1 posts
November 28, 2012 at 10:32 pm #474609I think you didn’t understand. I don’t want to override the core component with my own theme. I want to override the theme ja_mendozite itself. Hav a folder outside the template /templates/ja_mendozite/ that overrides not the core files, but the template ja_mendozite.
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
November 28, 2012 at 10:38 pm #474610<em>@johannesdach 348422 wrote:</em><blockquote>I think you didn’t understand. I don’t want to override the core component with my own theme. I want to override the theme ja_mendozite itself. Hav a folder outside the template /templates/ja_mendozite/ that overrides not the core files, but the template ja_mendozite.</blockquote>
I don’t think I misunderstood . . . read what I wrote again . . .<blockquote>Template overrides are a good method for changing the way Joomla shows component and module output without changing the core Joomla system code. This is important because it means that as/when Joomla is upgraded to new versions, you will not have to repeat the changes you made.</blockquote>
In other words, by setting up Template overrides, you are making changes to ONLY the template itself and NOT to the Joomla core files. Therefore, if/when you update Joomla – be it with a latest security update or an updated version – the update will ONLY affect the Joomla core files and NOT the elements for which you created modifications/customizations within your respective Template override(s).
Make Sense?
johannesdach Friendjohannesdach
- Join date:
- August 2010
- Posts:
- 26
- Downloads:
- 2
- Uploads:
- 0
- Thanks:
- 8
- Thanked:
- 6 times in 1 posts
November 28, 2012 at 10:52 pm #474611No. I don’t want to be able to update joomla. I want to save my changes I did to mendozite to be saved when I reinstall it for some reason.
Usual overrides work like this:
/templates/rhuk_milkyway/html/com_content/article/default.php
overrides
/components/com_content/views/article/tmpl/default.phpBut I want to override the template itself so that:
/templates/my_template/themes/green/css/template.css
only PARTIALLY overrides
/templates/ja_mendozite/themes/green/css/template.cssWhich means that if /templates/ja_mendozite/themes/green/css/template.css has the following 2 classes
#ja-topsl3 p.readmore a:active {
color: #799a51
}
#ja-topsl2 .item:hover .itemDate {
border-color: #799a51
color: #799a51
}But /templates/my_template/themes/green/css/template.css has the following
#ja-topsl3 p.readmore a:active {
color: black;
}The ouptut would be a mix of both, #ja-topsl2 from ja_mendozite and #ja-topsl3 from my_template because /templates/ja_mendozite/themes/green/css/template.css would be the fallback theme so that the result would be:
#ja-topsl3 p.readmore a:active {
color: black;
}
#ja-topsl2 .item:hover .itemDate {
border-color: #799a51
color: #799a51
}Is that possible?
johannesdach Friendjohannesdach
- Join date:
- August 2010
- Posts:
- 26
- Downloads:
- 2
- Uploads:
- 0
- Thanks:
- 8
- Thanked:
- 6 times in 1 posts
November 28, 2012 at 10:55 pm #474612So basically an override over the override, should we call it an ueberride??? 😉
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
November 28, 2012 at 11:11 pm #474615<em>@johannesdach 348425 wrote:</em><blockquote>So basically an override over the override, should we call it an ueberride??? ;)</blockquote>
Well then, you can either set up a separate Template override for EACH “override” you would ever want to revert back to, or you can simply create back up files for the particular modifications you make at any given time and keep them in a secure place for future reference/overwrite (if need be).johannesdach Friendjohannesdach
- Join date:
- August 2010
- Posts:
- 26
- Downloads:
- 2
- Uploads:
- 0
- Thanks:
- 8
- Thanked:
- 6 times in 1 posts
November 28, 2012 at 11:22 pm #474619Ok, I didn’t understand how the first option would work out. I have done the second option, keeping a file where I wrote down all the changes I have done so far so I can apply them again if the need arises but that is not as practical. This however would be great: If I understand overrides correctly the file which is loaded tat last defines what gets displayed. So if every page would load a custom.css file at the very end, this single file could hold all css changes. It is not practical for writing a template obviously because than the load would be unbearable, but if it only contained minor customizations that would be managable. That would be awesome. Still, could you explain what you were saying with option one? Thanks
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 30, 2012 at 8:09 am #474802<blockquote>So if every page would load a custom.css file at the very end, this single file could hold all css changes.</blockquote>
Its a good idea but sorry we wont be able to provide support for this for now.
-
AuthorPosts
This topic contains 10 replies, has 3 voices, and was last updated by Ninja Lead 11 years, 12 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum