Creating a new template
The templates in CComment5 have a specific structure. So instead of starting a new template from scratch we advise you to copy an existing template and make modifications to it (you can still give it a different name and it won't act as a template override, but as a different template).
Let us create a new template step by step.
Go to components/com_comment/templates . Copy the default template
Paste the default template in templates/your_joomla_template/html/com_comment/templates
Rename the default folder to mytemplate (mytemplate = the name you wish to give to your new template)
Now when you go to your joomla backend -> components -> ccomment -> Settings -> your component settings -> in the template tab you should be able to select the template that you just created.
Table Structure of a CCommet5 template
|This file contains the settings that are available in the backend of the component (in the template tab). You should not modify any of the default settings, but you are free to add your own settings (for example if you distribute this ccomment5 template with your own joomla template & you want to give some special features to your users). This file follows the JForm xml structure.
|This file contains the structure of each individual comment. You should not change any html ids or classes as this can lead to the malfunctioning of the component. On the other hand you are free to add your own classes to any html element and to move the elements as you see fit. You can remove any html element that has only bootstrap classes (row-fluid, small, pull-right etc), but you should not remove any html element that has a class starting with ccomment)
|This file is responsible for the footer that is displayed at the bottom of the template (Powered by ...) You can add your own footer text such as "Template designed by XYZ". However the user should be able to hide the footer by using the show footer options in the template parameters in the backend of the component.
|This file contains the code that makes the menu in the template (Comments (number of comments) add a comment \
|search buttons). Don't remove any elements that have a class starting with ccomment
|This file is responsible for the search form
|This file styles the search results
|This file is responsible for the readmore button that is shown in frontpage view (category view etc). And it also loads the code for the comment preview
|This file is responsible for the comment preview when on frontpage view (category view etc)The
In each of the template files you have access to the global configuration option for CComment. You can access any ccomment options by using $this->config->get('fields_name.field_name')