Search
Other Articles Anywhere questions
Forum

snippets and articles anywhere

Didier's Avatar Didier
Code that works within a regular article is displayed differently (layout) if I literally use the same code as a snippet and call this snippet from an article.
I've already searched in vain.
See code example and screenshot
I use Joomla! 4.4.0, Articles Anywhere 15.0.5 PRO and Snippets 9.0.1 PRO
What am I doing wrong?
Thanks, Didier.

The code:

{articles category:alias="appartement-deelartikels" tags="welkom" ordering="volgordenum ASC"}
{tab title="[title]" theme="accent-lines" color="blue" positioning="top" alignment="left"}
[title]
{if is-last}{/tabs}{/if}
{/articles}

Peter van Westen's Avatar Peter van Westen ADMIN
It is probably due to the system plugin ordering. Try changing the ordering of the plugins in question.
See: regularlabs.com/blog/242-plugin-order-is-important
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
That was it Peter and then the regular labs plugins. The Regular Labs System plugin order that gives a correct layout for both appears to be:
1. Snippets
2. Articles Anywhere
3. Tabs & Accordions
Thank you for the super quick answer and solution.
Didier.
Peter van Westen's Avatar Peter van Westen ADMIN
?
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
Hello Peter
I worked a little further with your powerful extensions and still encountered a “limitation”, although I can live with it, but it may again be due to my ignorance.
I want to use accordions nested in tabs, both through snippets.
I have defined 2 snippets, one for tabs and one for accordions, tags of both take nesting into account and both work perfectly separately. Articles Anywhere tag also takes nesting into consideration.
Nesting accordions in tabs works correctly if I define the tab directly in the article and call up articles within the tabs that call up accordions via snippets.
However, if I call up (the same) tabs via a snippet that contains the same articles that call up accordions via snippets, the accordions are displayed as nested.
Tried a lot already: changing order of plugins, configuring Regular Labs extensions, code...
Is there anything I can do about it?
Thanks,
Didier.


Code snippets:
<p>{articles-%naam% category:alias="%artikelcategorie-alias%" tags="%artikel-tag%" ordering="%artikel-order%"}</p>
<p>{tab-%naam% title="[title]" theme="accent-lines" color="blue" positioning="top" alignment="left"}</p>
<p>[article]</p>
<p>{if is-last}{/tabs-%naam%}{/if}</p>
<p>{/articles-%naam%}</p>
<p>{articles-%naam% category:alias="%artikelcategorie-alias%" tags="%artikel-tag%" ordering="%artikel-order%"}</p>
<p>{accordion-%naam% title="[title]" theme="accent-lines" color="blue" open="false" icons="true"}</p>
<p>[article]</p>
<p>{if is-last}{/accordions-%naam%}{/if}</p>
<p>{/articles-%naam%}</p>

Code article:
<h5>Accordion inside tab - tab encoded in article with 2 articles who call accordions via snippets - OK</h5>
<p>{tab-1 title="Plannen" theme="accent-lines" color="blue" positioning="top" alignment="left"}</p>
<p>{snippet alias="artikel-accordion" naam="plannen" artikelcategorie-alias="appartement-deelartikels" artikel-tag="plannen" artikel-order="volgordenum ASC"}</p>
<p>{tab-1 title="Handleidingen"}</p>
<p>{snippet alias="artikel-accordion" naam="handleidingen" artikelcategorie-alias="appartement-deelartikels" artikel-tag="handleidingen" artikel-order="volgordenum ASC"}</p>
<p>{/tabs-1}</p>
<h5>Accordion inside tab - tab via snippet with 2 (same) articles who call accordions via snippets - NOK</h5>
<p>{snippet alias="artikel-tabs" naam="plannen-handleidingen" artikelcategorie-alias="appartement-deelartikels" artikel-tag="plannen-handleidingen" artikel-order="volgordenum ASC"}</p>

See result:
Peter van Westen's Avatar Peter van Westen ADMIN
In this case the system plugin ordering would have to be:

- Snippets
- Articles Anywhere
- Tabs & Accordions
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
Well, the plugins were and still are in this order, Peter. I've tried just about every possible combination and this is the only order that gives correct results, except where one snippet calls another snippet.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Can you also give me (s)ftp access?
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
Confidential information:
(hidden)
Didier's Avatar Didier
Hello Peter

Have you had a look at the website yet? Can you log in?

Some more testing and additional information:

If I call up an article via Articles Anywhere, which in turn calls up a Snippets with Articles Anywhere and tabs & accordions, the tabs/accordions are not rendered properly.

If I call the same Snippets directly in an article, the tabs/accordions are rendered correctly.

Didier.
Peter van Westen's Avatar Peter van Westen ADMIN
You have a LOT of nesting going on. Also the article contents displayed inside the tabs are including other articles which contain also other types of tabs and accordions (not just Tabs & Accordions syntax).

There comes a point were the nesting can't continue to check for other nestings and plugin syntaxes can get seen out of turn.

I recommend you dumb it down a lot, as you have created a maze of nestings. I suspect that no-one but you would be able to manage this site and figure out where what is coming from...
Please post a rating at the Joomla! Extensions Directory
Didier's Avatar Didier
Yes Peter, I use standard bootstrap tabs and accordions and this is quite cumbersome, that's why I want to replace all this with your extensions, it's much simpler.

I just tried to see how far I can minimize the code with your extensions, dreams just make life bearable. But I understand that too many nests can lead to problems and I can live with that.

Thank you

Didier.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription