Search
Other Articles Anywhere questions
Forum

Nested articles don't nest tabs in 4.x

Jonathan Hodgdon's Avatar Jonathan Hodgdon
I'm going from Joomla 3.10.11 + Articles Anywhere 13.0.3 + Tabs 8.3.0 to Joomla 4.2.6 + Articles Anywhere 13.0.3 + Tabs and Accordions 1.1.1. All Pro versions.

I have an article with tabs which uses the normal {tab title="Title 1"}, {tab title="Title 2"}, ..., {/tabs} syntax. I have another article with the same. I reference the second article within one of the tabs of the first article using {article alias="alias1"}[text]{/article} syntax. All of this is pretty clean and simple; no other effects are going on.

In Joomla 3.x Tabs, this magically worked: the tabs in the child article were sub to the tab within which I placed the {article}...{/article} reference in the parent article. This has been hugely convenient, because one never knows in advance when one wants to just include one article within another, without having to modify any {tab} tags in the child article to be unique.

In Joomla 4.x Tabs & Accordions, this doesn't work for me. The tabs in both articles seem like they are considered to be all at the same tabbing level in the parent article; they do not nest. Feels like a step backwards, but it's certainly possible I'm doing something wrong.

I have spent some time researching the documentation and forum, but I am stumped so far. Can you tell me if this is a bug, or by design (yuk!), or else suggest something for me to pursue on my end? Thanks.
Peter van Westen's Avatar Peter van Westen ADMIN
What can be the reason that your Joomla 3 setup works differently to the Joomla 4 setup is the system plugin ordering.
On Joomla 3 you probably have Tabs ordered before Articles Anywhere.
And on Joomla 4 after it.

See: regularlabs.com/blog/242-plugin-order-is-important

A] So you can change the order.

B] Or you need to add nesting ids to the second article, as explained here:
docs4.regularlabs.com/tabsaccordions/going-further/nested-sets

C] Or you can add those nesting ids through Articles Anywhere, like:
{article ...}
[text replace="{tab =>{tab-nested "]
{/article}
Please post a rating at the Joomla! Extensions Directory
Jonathan Hodgdon's Avatar Jonathan Hodgdon
Ah yes, the plugin order thing, I should have checked that before writing. But it turns out that plugin order was the same between my Joomla 3.10.11 rig and my Joomla 4.2.6 rig. And playing around with the ordering anyway didn't seem to make any difference. So the reason for the different outcome is still a mystery. My experience is that plugin orders can occasionally unexpectedly change during updates (never have been able to figure that one out), and that's always felt a bit like a ticking time bomb to me.

So moving on and desiring tight control, I'll use Article Anywhere's "replace" attribute on the calling article's [text] tag, as suggested (thanks). I'll use the ID of calling article for the uniqueness seed suffix, and try to make that a consistent habit. This way, the {tab ...} tags in most articles can left as standard. I'm only chaining articles one level deep, because the offset-headings feature only works one level deep (I assume that's not changed in the Joomla 4 version).

Thanks for the speedy reply (as always).
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, happy you have it working 🙂

By default, plugins will all get an ordering number of 0. So then the order of installation determines the order they are executed in.
Once you change the order of some plugins, they will all get a unique ordering number, and the ordering is 'fixed'.

So if you have not changed any ordering (dragging a plugin under/above another), then the order you see in the plugin manager, might not reflect the actual execution order.
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