To simply show the titles of the articles inside the category "Dogs":
{articles category="Dogs"}
[title]
{/articles}
You can display any data attached to the article..
For example, [id]
will output the ID of the category, while [alias]
will output the alias.
You can also output the [url]
to the article, and automatically link to the full article page with:
[link][title][/link]
To show the name of the user that wrote the article, you can do:
[author]
Check out the Full List of Data Types available for every article data at your disposal.
Full Article
The [article]
tag will render the Full Article the way your template does in the default article page. Generally that includes the title, text and some meta data, like the author and published date (depending on your settings).
So if you want to output the complete article, you can do:
{article title="Modern Persian Cat"}[article]{/article}
But if you place nothing between the opening and ending tags, the full article will be used too. So this also works:
{article title="Modern Persian Cat"}{/article}
Alternative Layout
As you may know, in Joomla you can create alternative layouts for your articles. If you are not familiar with layout overrides, check out the dedicated tutorial on Layout Overrides in Joomla.
To give you a short overview, the default layout used to render articles is located at this path:
/components/com_content/views/article/tmpl/default.php
You can use this default file as your starting base, copy this file to templates/[my template]/html/com_content/article/my-layout-name.php
, and edit the code to meet your needs.
Now, in the data tag, you can set to use the alternative article layout by simply inserting the name of the file in the layout="..."
attribute:
[article layout="my-layout-name"]
You can also use the layout from a different template, by specifying the template where it resides with the format template-name:layout-name
:
[article layout="protostar:my-layout-name"]