Skip to content

[ext:joomla] How to display content from a specific article ID #746

Discussion options

You must be logged in to vote

Hello Matthew,

Displaying content from a single Joomla article is very easy in Pages using the Joomla extension. Here are the steps (for 0.21):

Install Joomla extension

Installing the Joomla extension is really simple, just download http://files.joomlatools.com/[email protected]/extension-joomla.zip and put it in /joomlatools-pages/extensions directory.

Getting an article by id or alias

The Joomla extension provides a customarticle() template function that allows to get a single article by it's id or alias.

For example to retrieve the article with id = 1

<article>
   <h1><?= article(1)->title ?></h1>
    <p><?= article(1)->excerpt.article(1)->text ?></p>
</article> 

To get an idea of all the d…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@raramuridesign
Comment options

@johanjanssens
Comment options

@raramuridesign
Comment options

@johanjanssens
Comment options

Answer selected by johanjanssens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants