Search
Other Articles Anywhere questions
Forum

next/previous buttons

Didier's Avatar Didier
I manage to generate a “news” module with pagination using Articles Anywhere, but would like to limit the page navigation to previous and next arrows, see image. I get those arrows shown, the action that should be connected to them not. How do I get the desired action (next/previous) behind the arrows?
I've tried a lot, including your example Numbers Previous/Next in your documentation, but that example by itself doesn't work on my site.
See print screen and code below.
Can you help me out a bit?
Thank you.
Didier.
BTW: top tool!


<p>{articles category="Actualiteit Home" include-child-categories="true" ordering="publish_up DESC" limit="6" per-page="3" pagination="true" page-param="actueel2"}</p>
<p>{if first}</p>
	<div class="row row-cols-1 row-cols-md-3 g-4">
<p>{/if}</p>
	<div class="col">
		<div class="card actueelaa">
			<div class="container d-flex align-items-center justify-content-center card-img-top">[image-intro height="280"]</div>
			<div class="card-body">
				<h4>[link][title][/link]</h4>
				<p>[introtext characters="200" html="false"]</p>
			</div>
		</div>
		{if count=1}
			<p class="prevnext">&lt;</p>
		{elseif count=3}
			<p class="prevnext" style="text-align: right;">&gt;</p>
		{else}
			<p class="prevnext">&nbsp;</p>
		{/if}
	</div>
<p>{if last}</p>
	</div>
<p>{/if}</p>
<p>{/articles}</p>
Peter van Westen's Avatar Peter van Westen ADMIN
Well, the pagination stuff would be controlled via the URL...
Seeing you have a slider type thing in your design, I guess you don't want the page to reload every time you click on an arrow.

In that case, you would need to output all the articles you want to have in the slider.
And use javascript to make them slide/show to the left and right.

If you DO want the page to reload, you could use the INPUT values to set the offset in the filters:
docs4.regularlabs.com/articlesanywhere/data-tags/input-values
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
I just can't do it, no matter what I try, I doubt if what I want to achieve is possible.
Navigation works perfectly with pagination="false". But if I want to limit the output, I have to enable pagination and use offset as you point out.
I can't find a good offset, probably something like offset="input:offsetparameter:0". But I don't find how to give offset parameter an initial value.
And I can't find the link code (href) to decrease or increase that offset parameter either.
See basic code below.
Can you help me on my way again?
Thank you.
<p>{articles category="actualiteit-home" limit="false" per-page="3" pagination="true" offset="0"}</p>
<h4 id="article-[count]">[title]</h4>
<p>[introtext]</p>
<p><a href="#article-[previous]">previous</a> <a href="#article-[next]">next</a></p>
<p>{/articles}</p>
Peter van Westen's Avatar Peter van Westen ADMIN
Seeing you have a slider type thing in your design, I guess you don't want the page to reload every time you click on an arrow.
Or:
If you DO want the page to reload...

???
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
Hi Peter
I have read and understood your question and comment and so "DO want the page to reload" = YES 🙂 , therefore my second question for clarification.
Thanks.
Didier.
Peter van Westen's Avatar Peter van Westen ADMIN
You can simply add a page=... attribute to the URLs of the left/right arrows.
<a href="...current URL...?page=[previous-page]">previous</a>
<a href="...current URL...?page=[next-page]">next</a>

See: docs4.regularlabs.com/articlesanywhere/data-tags/numbers
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
Thanks Peter, this works now!
Didier.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription