Search
Other ReReplacer questions
Forum

ReReplacer not working on Custom Fields

Marc's Avatar Marc
Hi Peter,

I was trying to use ReReplacer to add
target="_blank"
to hyperlinks.

It works fine within the introtext/fulltext of the Articles... but no matter my settings it seems that it does not trigger for my Custom Fields (of Type Editor for example).
Have I missed something ?

Txs,

Marc
Peter van Westen's Avatar Peter van Westen ADMIN
ReReplacer can only replace in the html output of the page. So check if the syntax you are looking for is there in the 'View Source' (not the Element Inspector).
Please post a rating at the Joomla! Extensions Directory
Marc's Avatar Marc
Here is the 'View Source' :
<dd class="field-entry proprietaire hideonblog">	<span class="field-label ">Propri&eacute;taire: </span>
<span class="field-value "><p><a href="http://collections.viewallonne.be/#/query/cf2e2f7b-69ac-4cb4-acfc-6cb6d01b5644">Musée de la Vie wallonne</a></p></span>
</dd>

And what I do is replacing
<a href="http
by
<a target="_blank" href="http

=> normally it should work.

So I investigated further :
if "Enable in area" is set to
- Everywhere : OK
- Component : OK
- Content (Articles & Categories") : NOK

So maybe a bug, bc CF are part of Content (Articles & Categories), aren't they?
Peter van Westen's Avatar Peter van Westen ADMIN
No, not a bug. The "Content (Articles & Categories)" thing, means it is run over content passed through the onContentPrepare event. I think the fields are added to the output of the article after that.
So in your case, choosing Component would be the way to go.
Please post a rating at the Joomla! Extensions Directory
Marc's Avatar Marc
OK, good enough 🙂
Txs!
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription