Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-09-26 14:10:46
- elliot100
- Member
- Registered: 2008-09-26
- Posts: 13
Can anyone clarify what <txp:text> does?
Textbook says “The text tag is a Single_Tag which is used to display static text as defined in the tags attribute (item)”
The Impatient Users Tag Reference says “To add custom text … we can use the TXP general purpose tag <txp:text />, which will be replaced by the value you specify it on the attribute item.”
I took this to mean the example <txp:text item=“hometext” /> would just display ‘hometext’, and couldn’t see what its purpose was.
But I noticed it’s used in a different way in the default forms, eg <txp:text item=“comment_web” /> is used to display ‘website’ as a label for the relevant comment field, and so then assumed that its main purpose was internationalisation – where ‘item’ matches an key in a language file, the value matching that key is displayed.
However, I just tried to display an arbitrary key, ‘password_reset’, from the British English language file, and got exactly that displayed, rather than the expected ‘Reset password’.
What’s the definitive story – and is there any reason to use it at all if you’re not planning to publish your site in more than one language?
cheers
Last edited by elliot100 (2008-09-26 14:13:35)
Offline
#2 2008-09-26 14:22:52
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Can anyone clarify what <txp:text> does?
Here we’ve been talking about <txp:text />
, finding out how it works and trying to find a use for it :) It will at least answer some of your questions.
Offline
#3 2008-09-26 14:29:19
- elliot100
- Member
- Registered: 2008-09-26
- Posts: 13
Re: Can anyone clarify what <txp:text> does?
Thanks! I did search for this, but guess terms were too generic to find that thread.
Offline