Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1912

General Questions/New to Joomla! 5.x • Re: Want 1 Child Template - but the function makes more than one.

$
0
0
When you create a child template in Joomla, the system generates a new template directory with its own templateDetails.xml file. This file defines the structure and parameters of the template. It's normal for this file to be different from the original templateDetails.xml of the parent template, as the child template can have its own unique settings and overrides.

Duplicate Templates
When you created the child template, it seems that the system generated an extra template instance by mistake. This might be a bug or a glitch in the process. Deleting the unwanted template (ID 16 in your case) was the right step.

Language Constants Issue
The issue with language constants showing up instead of actual text suggests that the language files are not correctly set up or linked in your child template. This can happen if the child template does not inherit or reference the correct language files from the parent template.

Verify templateDetails.xml
Ensure that your templateDetails.xml file in the child template is correctly referencing the necessary files and settings. Here’s a basic outline of what it should include:

Code:

<?xml version="1.0" encoding="utf-8"?><extension version="5.1.1" type="template" client="site">    <name>Child of Cassiopeia</name>    <creationDate>2024-05-30</creationDate>    <author>Your Name</author>    <authorEmail>you@example.com</authorEmail>    <authorUrl>https://yourwebsite.com</authorUrl>    <version>1.0.0</version>    <description><![CDATA[Child template of Cassiopeia]]></description>    <files>        <filename>index.php</filename>        <filename>templateDetails.xml</filename>        <!-- Add other files here -->    </files>    <languages>        <language tag="en-GB">language/en-GB/en-GB.tpl_child_of_cassiopeia.ini</language>        <language tag="en-GB">language/en-GB/en-GB.tpl_child_of_cassiopeia.sys.ini</language>    </languages>    <!-- Add any additional configuration you need --></extension>
Ensure Language Files
Ensure that your child template has its own language files or correctly references the parent template’s language files. If you don't have custom language files, you can copy the parent template's language files to the child template's language directory and adjust the references in templateDetails.xml.

Assign Template to Pages
After ensuring that your child template is correctly set up, go to the Joomla backend:

Navigate to Extensions > Templates > Styles.
Select your child template (ID 15).
Assign it to all the necessary pages.

Statistics: Posted by CloudExpert — Fri May 31, 2024 9:58 am



Viewing all articles
Browse latest Browse all 1912

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>