Search
Other Articles Anywhere questions
Forum

Default Ordering

dee's Avatar dee
Hi Peter, two questions about ordering in AA:

1. Why isn't in the plugin settings > behaviour > multiple articles > "order by" a setting for "ordering"? Is this somehow possible, that the default is actually "ordering"?

2. Does it make sense, to include a feature, where the sequence of the IDs would actually be accepted as the ordering?
For example:
{articles id="219,218" ordering="order-by-id-sequence"}
...so that even though articles 219 and 218 have a different article ordering (218 is first, 219 is second), or default ordering in the plugin is set to something else, both options should be overwritten and article 219 should be shown first and article 218 second, because there the attribute "ordering" is explicitly set to "order-by-id-sequence" (...or similar, if existent).
Also it would be nice to add this option also to the plugin settings for behaviour > order by

All best,
Dino
Peter van Westen's Avatar Peter van Westen ADMIN
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
PS: No, there is no option to keep the ordering of the ids given in the filter.
Please post a rating at the Joomla! Extensions Directory
dee's Avatar dee
So "Article Order" is the equivalent of "Ordering"?
If YES, could it be, that the problem lies in the combination with "snippets"?
This is the setup:
{snippet alias="team" team-id="218,217"}
The snippet:
<div>{articles id="%team-id%" tags="%tag%" ordering="%order%"}
<div>[image-intro]</div>
<div>[title]</div>
<div>[titel-name]</div>
{/articles}</div>
with the following setup:

As you can see, the article ordering is set correctly:


But no matter what I do, "Member B" with the ID 217 is shown/rendered first!?
Peter van Westen's Avatar Peter van Westen ADMIN
You have set the default for the Snippets 'order' variable to '*'.
So if you don't specifically set it to 'ordering', then that will result in:
{articles id="..." tags="..." ordering="*"}
Seeing you are specifically adding an ordering attribute, it will ignore the default setting.
Please post a rating at the Joomla! Extensions Directory
dee's Avatar dee
Yes! Thanks. All I needed to do is replace the default value for ordering "*" with "ordering".
I was expecting that "*" defaults to settings > behaviour > multiple articles > "order by" = "Article Order", if "order" is not specified in the snippet. But this rather displays the articles, ignoring the setting of "order by" = "Article Order" and defaults to what? = "Title" it seems?
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases

You should be able to make the articles return in the order of the given ids in the filter by using:
{articles id="5,2,4" ordering="none"}

This only works when using ids as the filter. It won't work on filtering by alias or title or such.


Regarding empty ordering (ordering="" or ordering="*"), then ordering is pretty much whatever the database decides. Usually that is by ID number, but can differ depending on filters. So you should use the ordering.

If you want to have it fall back on the default ordering, then DO NOT include the order="..." attribute in the tag.
Like explained earlier, you could output a different {articles} tag via Snippets, depending on what you pass to the Snippet, using the if statements in Snippets.
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