J
J
Jan Merkif2018-10-29 15:41:41
Joomla
Jan Merkif, 2018-10-29 15:41:41

How to change joomla news output template markup?

Hello.
There is a site that displays news through the standard com_content
I want to change the markup I climbed into the components/com_content/views/featured/tmpl/default_item.php file I
added a custom field where you can add introductory text (without "add more" in the editor). It turned out / only the sequence of tags is not the one I would like to see. The problem was partially solved through flexboxes and an order. I decided to go even further and change the layout of the news cards as in kod.ru
I look at html and there are pieces of code that are not in the default_item.php file. For example, the date of publication, the thumbnail of the material, etc. in php is not strong. Can someone tell me how to make the necessary markup with the correct title, introductory text, picture and publication date. Example5bd6ff4b635f7506082861.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Goryachev, 2018-10-29
@Merkif

1) Extensions - Templates - Templates, select your template
2) Create a redefinition of the com_content / featured template, work with it so that nothing crashes when updating
3) Open /templates/template/html/com_content/featured/default_item.php
4) Add var_dump($this->item); in the output and see what fields are there.
I can't say for sure, but it seems $this->item->created is responsible for the date $this->item->image_intro
is responsible for the news thumbnail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question