Question

I have noticed that a name of a template in joomla's component view begins with "default_" part. What the reason for it, how it can be changed?

Was it helpful?

Solution

you can simply create different template overrides as you like. F.ex. in com_content article view, make a copy of default.php and call it simple.php. You can display the new article template by calling index.php?option=com_content&view=article&tmpl=simple&id=an-id.

The _ - notation is to be able to divide the template into logical parts. F.ex. for the category blog-layout you have blog.php as the entry-point. The blog-layout is looping throug the content items in the category, and calling blog_item.php for each article item. So code relating directly to each article is handled here. If you override files in the template, you can choose to only override one of the files( like blog_item.php ), and let the other file get handled by by the component as usual.

regards Jonas

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top