Search
Other Articles Anywhere questions
Forum

DIV not working in Joomla 4

Nathanael Holzer's Avatar Nathanael Holzer
Hi
[div] is not working in Joomla 4. Has this feature been removed? There's no info on that topic in the documentation.

This code works in Joomla 3 but not in Joomla 4:
{articles categories="154,94" ordering="ordering DESC"}

{if uneven}[div class="rowInfos"]{/if}

[div class="spa-tb-2 spaInfos"]
[title]

[introtext]{if fulltext}{modal url="[url]" title="[title]" className="infoModal"}weiterlesen{/modal}{/if}

[/div]

{if even}[/div]{/if}

{/articles}
The div tags are output as plain text on the website instead of functional html tags.
Peter van Westen's Avatar Peter van Westen ADMIN
Correct, that feature was deprecated a long time in the J3 version (not mentioned in any docs for years). It is not included in the Joomla 4 version.
Please post a rating at the Joomla! Extensions Directory
Nathanael Holzer's Avatar Nathanael Holzer
Bummer...
Is there different way integrating bits of html structure?
Peter van Westen's Avatar Peter van Westen ADMIN
Simply place the html directly in the HTML editor.
So:
{articles categories="154,94" ordering="ordering DESC"}

{if uneven}<div class="rowInfos">{/if}

<div class="spa-tb-2 spaInfos">
[title]

[introtext]{if fulltext}{modal url="[url]" title="[title]" className="infoModal"}weiterlesen{/modal}{/if}

</div]

{if even}</div>{/if}

{/articles}

Alternatively you could use ReReplacer to set up placeholders for HTML tags.
Please post a rating at the Joomla! Extensions Directory
Nathanael Holzer's Avatar Nathanael Holzer
Thanks ??
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription