Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-09-07 21:08:41

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

Re: txp:tags within tags

thank you rudd!

Offline

#14 2006-09-08 14:57:35

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: txp:tags within tags

Many thanks ruud, much appreciated.

However, it’s returning the following error:
<code>
Parse error: parse error, unexpected ‘=’, expecting ‘)’ in /home/httpd/vhosts/conwaytennisclub.co.uk/httpdocs/site/textpattern/publish/taghandlers.php(1726) : eval()’d code on line 1
</code>

Any ideas?

Offline

#15 2006-09-08 15:05:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: txp:tags within tags

Yes, there was a ‘>’ missing behind the ‘=’ (after ‘title’). Fixed in my earlier post.

Offline

#16 2006-09-08 15:15:53

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: txp:tags within tags

Thanks Rudd, it works now.

Just one more question – would it be difficult to have the person’s name (<code><txp:title /></code>) appear with the email link, rather than the wording “Contact”?

Offline

#17 2006-09-08 15:47:04

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: txp:tags within tags

Hi ruud

The variable (person’s name) is stored as the article title.

Offline

#18 2006-09-08 16:17:18

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: txp:tags within tags

Replacing <code>‘title’</code> with <code>‘linktext’</code> should do that.

Offline

#19 2006-09-08 16:21:00

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: txp:tags within tags

Perfect!

Many thanks for your help ruud.

Offline

#20 2006-09-15 19:14:04

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

Re: txp:tags within tags

i am trying to have an “about the author” form show up at the end of each article. what i need to do is this within the article form:
<code><txp:article_custom form=“aboutTheAuthor” section=“About-The-Author” author=”<txp:author/>”/></code>

since that is clearly not possible, i am using this php script in the article form but it is still not working right. does anyone have any idea why?

<code><txp:php>echo article_custom(array(‘form’ => ‘aboutTheAuthor’, ‘section’ => ‘About-The-Author’, ‘author’ => author(array()) ) );</txp:php>
</code>

is there any other PHP i have to stick in the form?

Last edited by alittle116 (2006-09-15 19:23:04)

Offline

#21 2006-09-15 21:19:24

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: txp:tags within tags

You might be intereted in this plugin (ransom) which makes it possible to use tags in attributes:
http://forum.textpattern.com/viewtopic.php?id=18593

Offline

#22 2006-10-27 02:53:49

cgriff44
New Member
From: Portland, Oregon
Registered: 2005-11-05
Posts: 6
Website

Re: txp:tags within tags

I’m trying to do the same thing except using the <txp:email /> tag.

Only reason I’d rather use this method is to spam proof the emails rather than leaving them open.

How would this be possible using the example below? I would be pulling it from a custom field labelled “email”

<txp:email email=“me@textpattern.com” />

Offline

#23 2006-10-27 03:52:28

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: txp:tags within tags

Mary’s code uses the txp:email tag, so the address is encoded. This article should help a little too.

Last edited by jm (2006-10-27 03:52:42)

Offline

#24 2006-10-27 04:01:59

cgriff44
New Member
From: Portland, Oregon
Registered: 2005-11-05
Posts: 6
Website

Re: txp:tags within tags

Hmm….I totally missed that.

I’m an idiot, thanks Jm.

Offline

Board footer

Powered by FluxBB