Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Is there a way to use txp:email without generating a link?
I want to use txp:email to obfuscate an eMail address (grabbed from a txp:variable), but since this will be presented as the content of a <link rel="author"
element in the document head. Is there any way to make txp:email output the encoded eMail address only, without an anchor element? Or is there another way you would recommend?
Thanks!
Offline
Re: Is there a way to use txp:email without generating a link?
johnstephens wrote:
Is there any way to make txp:email output the encoded eMail address only, without an anchor element?
No, it always produces a link.
Or is there another way you would recommend?
Easy to hack it or make a plugin giving you that option. There might be a plugin — have you looked?
Code is topiary
Offline
Re: Is there a way to use txp:email without generating a link?
Thanks for the swift reply, Jeff!
I didn’t look for a plugin before posting, because I thought there might be a native way to do this. I check Textpattern Resources and found a bunch of options. So far, none of them do what I want, but I’ll pore over them. Thanks again.
Offline
Re: Is there a way to use txp:email without generating a link?
I can’t find one that doesn’t depend on javascript or generate unnecessary markup (yab_email comes the closest, but it generates a span
element, which is invalid in the context). Would there be an easy txp:php solution to this?
Offline
Re: Is there a way to use txp:email without generating a link?
johnstephens wrote:
I can’t find one that doesn’t depend on javascript or generate unnecessary markup (yab_email comes the closest, but it generates a
span
element, which is invalid in the context). Would there be an easy txp:php solution to this?
Untested: put this in a form:
<txp:php>
echo eE(yield());
</txp:php>
Call the form in output_tag output_form
’s container mode, with the email address (in this case the variable
) as the tag contents.
Edit: sorry, output_form
not output_tag
. I tested it and it does work.
Last edited by jsoo (2009-10-01 18:57:05)
Code is topiary
Offline
Re: Is there a way to use txp:email without generating a link?
Thank you again, Mr. Soo! Light, nimble solution, no plugin!
Offline