Search
Other Articles Anywhere questions
Forum

AA code in module

Odin Mayland's Avatar Odin Mayland
I currently have some AA code in the article content and it will display on the category-blog page.

I want to move this working AA code out of the article content and into a module or other solution to reduce the chance of the client messing up the AA code.
****
I put the same AA code in a custom_html module and used AMM to display it on any article that has a specified tag.

But the module inserted code does not appear on the category-blog page or filter the matching articles per the code.

Is it possible to get this code to work in a module? Or is there another solution you offer?
<p>{articles category="Release Notes" title="!this:id"} {if publish_up = this:publish_up}</p>
<div class="eachrelease">
	<div class="eachreleaseheader">
		<h3>[title]</h3>
	</div>
	<p>[text]</p>
	<div class="panel">[fixed label="true"] [changed label="true"] [added label="true"] [removed label="true"]</div>
	{/if}
</div>
<p>{/articles}</p>
Peter van Westen's Avatar Peter van Westen ADMIN
The 'this' keyword only works in article pages. If you are on a category page, the 'this' makes no sense outside the article. So no, you won't be able to use that in a module like that.
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
I understand the category issue.

I tried to insert the same AA code using Snippets but it too failed.
https://www.dropbox.com/s/f1t3r96gxnhh16x/Screen%20Shot%202021-09-14%20at%201.51.24%20PM.png?dl=0

Is this a limitation of Snippets?
Andrea Malalana's Avatar Andrea Malalana ADMIN
See: regularlabs.com/blog/242-plugin-order-is-important

In this case, most likely, Snippets must be ordered before Articles Anywhere.
Odin Mayland's Avatar Odin Mayland
Snippets before AA does not show the random text but it also doesn't display the AA code.

https://www.dropbox.com/s/w4nz4uiovufgn74/Screen%20Shot%202021-09-15%20at%2012.46.56%20PM.png?dl=0
Peter van Westen's Avatar Peter van Westen ADMIN
This can be because the {if} tags are being interpreted by Snippets, as it too supports those.
I recommended you change the syntax characters for those in the Snippets component settings.
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
When I change it to something else I get this:
help.thinkiq.com/release-notes
https://www.dropbox.com/s/gk6zbbfr3q79eqp/Screen%20Shot%202021-09-15%20at%201.21.32%20PM.png?dl=0
https://www.dropbox.com/s/beu6lcdbhvxlffn/Screen%20Shot%202021-09-15%20at%201.22.35%20PM.png?dl=0
Peter van Westen's Avatar Peter van Westen ADMIN
Correct. Like the description of that option tells you, changing that will mean you need to also change your snippet tags to match the new syntax.
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
Oh, I see. I also needed to change the snippet tag in the article content to {{ }}.

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

Buy a Pro subscription