Search
Other ReReplacer questions
Forum

[SOLVED] Can I trigger ReReplacer plugin a second time during the page render?

Patrick Jackson's Avatar Patrick Jackson
I know there's an inherit basic limitation to how Joomla plugins sequentially fire that is causing me a headache at the moment that I hope there's a way to get around.

- Page renders a Yootheme layout with dynamic field used to load the article ID into a short code - so it looks like
{renderlayout x}
where x is the ID
- ReReplacer triggers to change a custom shortcode tag from the short information needed into the layout it's replaced with.
- The ReReplacer layout includes a number of Articles Anywhere custom field calls, creating the Custom Fields layout along the way.
- I then want to call ReReplacer a second time to dynamically modify some links and content inside the ReReplacer layout - eg change the value of a youtube URL to use embed instead of watch - but alas that needs ReReplacer to fire again.

Currently plugin ordering is:
- ReReplacer
- Articles Anywhere

So once they sequentially fire, the subsequent need to fire ReReplacer again does not trigger... and I'd really like to work out a way to make it do so.

Options thought of so far don't work.

First was to try is to duplicate the Extensions Table entry for the ReReplacer plugin and have it fire again after all the other plugins fire. Seems that it doesn't.

Any thoughts on a potential solution?
Peter van Westen's Avatar Peter van Westen ADMIN
You could try setting the first replacement to Search Area 'Articles'.and the second to 'Everywhere'.
Please post a rating at the Joomla! Extensions Directory
Patrick Jackson's Avatar Patrick Jackson
Thanks - that's worked exactly how I needed it to. I'd initially been trying Body + Everywhere, and didn't think it through late last night that Content would fire more specifically.

Just had to also set "Enable in HTML Tags" to yes for it to also modify the values that were being displayed in a different format such as Youtube videos where I was switching the /watch?v= to /embed/ so that the video link then plays in the iframe.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription