1

I want my template to display Article Titles and Bodies with the following markup:

<div class="section">
  <div class="section-head">
    <h3>My Title Goes Here</h3>
  </div>
  <div class="section-body">
    <p>Body goes here</p>
    <p>Lorem Ipsum etc... </p>
  </div>
</div>

How can I achieve this? All the tutorials I've found have been too basic and do not cover sufficient detail any more than

<jdoc:include type="component" />

Which will contain the whole article, leaving me with no control over markup.

  • 1
    docs.joomla.org/… – Neil Robertson Mar 14 '17 at 22:30
  • thanks for the tip. I have used the technique described to override the com_content/views/featured/tmpl/default_item.php file in my template at templatename/html/com_content/views/featured/default_ite.php but it does not work – NickJ Mar 15 '17 at 8:27
  • found it, i needed to delete the views directory as well – NickJ Mar 15 '17 at 8:32
  • @NickJ or Neil please add this as a full answer below and mark it as accepted;) – Lodder Mar 15 '17 at 13:16
2

You need to override Joomla! template.

Here are some details about overriding Joomla! template:

https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

You can also check basics about creating Joomla! templates:

https://docs.joomla.org/Creating_a_basic_Joomla!_template

And here is a complete section about Joomla templates:

https://docs.joomla.org/Portal:Template_Development

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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