Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Txp:custom_field problems
Hi all,
I’m having problems using custom field. All i want to do is print the custom field ‘bannername’ .
<txp:custom_field name=“bannername” />
But it just returns empty, even though it isn’t …
this is confusing the hell out of me… thoughts anyone?
Textpattern version: 4.0.2 (r1076)
Offline
Re: Txp:custom_field problems
All i want to do is print the custom field ‘bannername’ . But it just returns empty, even though it isn’t …
Bummer, my psychic reception has been very week during the last weeks. You’ll actually have to explain in detail and show the tags, the forms, the templates that you are using, otherwise we can’t help.
Also, have you looked at the documentation:
http://textpattern.net/wiki/index.php?title=Txp:custom_field_/ ?
Offline
Re: Txp:custom_field problems
Okay, i had that coming ;)
i have named custom field number one “bannername”. it contains the name of a banner for the article. nothing special really. the custom field exists, and is filled with values.
when i show an article, i try to test the output by simply putting
<p><txp:custom_field name="bannername" /></p>
It’s the simplest implementation, i got from that exact page.
Is there some way i can debug it, to find out where my missing value is?
Last edited by zem (2006-01-04 22:11:10)
Offline
Re: Txp:custom_field problems
What does the article form your using look like? You actually have to call the custom field expicitly in the form. The default article form doesn’t call any custom fields. something like.
<code>
<txp:custom_field name=“Bannername” />
</code>
Last edited by mrdale (2006-01-04 22:13:13)
Offline
Re: Txp:custom_field problems
the default bit.
txp:article form=“default” limit=“1” /
txp:custom_field name=“bannername” /
Your question assumes there is probably something wrong with that setup, am i correct? (yes, this is my first txp project)
edit: you mean, in the form itself, and not in the page template?
Last edited by Hayo (2006-01-04 22:14:28)
Offline
#6 2006-01-04 22:13:24
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Txp:custom_field problems
The custom_field tag should go in your article form.
Alex
Offline
Re: Txp:custom_field problems
Thanks guys, i knew it had to be a stupidly easy solution! Just getting the hang of the txp syntax seems to be my real problem :)
Offline
Re: Txp:custom_field problems
duplicate the default article form.
Add the <code><txp:custom_field name=“FieldName” /></code> in the order that you want it to appear in relation to the other article components (body/headline/excerpt) and Bob, as they say, is your uncle.
Offline
Re: Txp:custom_field problems
> Hayo wrote:
> Thanks guys, i knew it had to be a stupidly easy solution! Just getting the hang of the txp syntax seems to be my real problem :)
No problem. Forms (article and otherwise) will be your best friend. They’re why I love TXP.
Last edited by mrdale (2006-01-04 22:18:37)
Offline
Pages: 1