0

I am new to Joomla and am having some difficulties. I have been asked to work on a site for someone and I need to adjust the HTML on their Blog post page (the page that lists all the blog posts whit their intro text and intro images).

Looking in the index.php of the template (which is the only HTML file in the template folder) I dont see any mention of the blog page.

Would anyone be able to help me out and point me in the right direction here? Should I be looking in Joomla's layouts directory?

Thanks

1 Answer 1

1

The layout for Category Blog is actually is defined in this file :

../components/com_content/views/category/tmpl/blog.php

If you open the file, you will see this file will call these child layouts :

../components/com_content/views/category/tmpl/blog_item.php
../components/com_content/views/category/tmpl/blog_links.php
../components/com_content/views/category/tmpl/blog_children.php

So, basically you can change the layout for blog layout by modifying those files above.

But, it is NOT recommended to modify those files directly because any change you made on those files will be overwritten when a Joomla update is installed in the future.

So, how to deal with it? Joomla has a template override features that allows you to override visual output of any extension you have. You can read the fully explanation here but in your case above, you just need to copy those files above to :

../templates/your_template_name/html/com_content/category/blog.php
../templates/your_template_name/html/com_content/category/blog_item.php
../templates/your_template_name/html/com_content/category/blog_links.php
../templates/your_template_name/html/com_content/category/blog_children.php

and modify it. If the folder 'html' doesn't exist on your template, simply create it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.