My organization has about 100 chapter websites on J3. There are four different templates across the sites and one of the templates has nine different "skins" (or color options). The different color options are setup in the templateDetails.xml and the color selection is made in the template styles advanced tab by the administrator. All of the CSS files for all of the sites are located in a one folder on the server. The appropriate css is called in the index.php based on the choice made in template styles. We designed it this way so that we have to make a change in the template we can do it in the centralized css and it will be propagated to the sites appropriately.
Now we are in the process of converting these sites to J4. We would like to again have the centralized css and associated alternate color schemes. I have designed a child template and presently the user.css is in the media/templates/site/mytemplate folder. The alternate color css's are in media/templates/site/cassiopeia/css/global. That is working fine.
I have a separate index.php in the child template folder. In the index.php there is code to get the color selection as follows:I have tried to point the code elsewhere but it is being ignored. How can I change the code to point to a central location?
Additionally, the templateDetails.xml has this code: How can I change this to point to the central folder?
Or is there a better way to do this?
One of the sites is j4rforest.californiadar.org
Now we are in the process of converting these sites to J4. We would like to again have the centralized css and associated alternate color schemes. I have designed a child template and presently the user.css is in the media/templates/site/mytemplate folder. The alternate color css's are in media/templates/site/cassiopeia/css/global. That is working fine.
I have a separate index.php in the child template folder. In the index.php there is code to get the color selection as follows:
Code:
// Color Theme$paramsColorName = $this->params->get('colorName', 'colors_standard');$assetColorName = 'theme.' . $paramsColorName;$wa->registerAndUseStyle($assetColorName, 'media/templates/site/cassiopeia/css/global/' . $paramsColorName . '.css');
Additionally, the templateDetails.xml has this code:
Code:
<media folder="media" destination="templates/site/cassiopeia_dar2024">
Or is there a better way to do this?
One of the sites is j4rforest.californiadar.org
Statistics: Posted by kkurtz — Tue Jan 23, 2024 7:47 pm