Search
Other Articles Anywhere questions
Forum

Create module with "previous" "next" Buttons depending on current article

Tim Ziegeler's Avatar Tim Ziegeler
Hi!

I'd like to create a module that shows prev / next buttons on the article view.
Ordering should be by pusblish_up and I want to create the link my self so I would need to access date for the PREVIOUS and NEXT article (from a bunch of categories, not just the active one).

Is that possible?
Peter van Westen's Avatar Peter van Westen ADMIN
Not sure I understand what you want, but you could try something like this:
{articles categories="Fruit,Animals"}
{if next:id = this:id}[link]Previous[/link]{/if}
{if previous:id = this:id}[link]Next[/link]{/if}
{/articles}

(remove the new lines to prevent loads of enters/whitespace)
Please post a rating at the Joomla! Extensions Directory
Tim Ziegeler's Avatar Tim Ziegeler
Hi Peter,

unfortunately the code doesn't work for me. It seems like you can display the next:id / previous:id but you can't query them in if statements.

Is this a bug in AA?

I tried this code
{articles category="177" include_child_categories="true" ordering="publish_up DESC"}
{if next:id = this:id}{link}Previous{/link}{/if}
{if previous:id = this:id}{link}Next{/link}{/if}
{/articles}

Cheers,
Tim
Peter van Westen's Avatar Peter van Westen ADMIN
It is working fine for me.

Are you running on Joomla 3 or 4? Do you have the latest version of Articles Anywhere installed?
Please post a rating at the Joomla! Extensions Directory
Tim Ziegeler's Avatar Tim Ziegeler
Hi! I updated to the latest Articles Anywhere version but it's still not working.
I am using the latest Joomla 3 version...
Peter van Westen's Avatar Peter van Westen ADMIN
Ah, well, Joomla 3.

The previous and next stuff is only available in the Joomla 4 version.
There is no solution for what you want with the Joomla 3 version of Articles Anywhere.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription