Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Concatenating with <txp:variable />
Can I concatenate two <txp:variable />‘s
<txp:variable name=“a” value=“concat” />
<txp:variable name=“b” value=“enate” />
then
<txp:variable name=“c” value=”<txp:variable name=“a” /><txp:variable name=“b” />” />
I’ve tried a few combinations but I’ve had no luck.
Is it possible?
Thanks
Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: Concatenating with <txp:variable />
<txp:variable name="a" value="concat" />
<txp:variable name="b" value="enate" />
<txp:variable name="c" value="<txp:variable name='a' /><txp:variable name='b' />" />
Echo c: <txp:variable name="c" />
It’s an issue on apostrophes!
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: Concatenating with <txp:variable />
Yes, except to do tags within tags you need single quotes around the enclosed tag, as in:
<txp:variable name="c" value='<txp:variable name="a" /><txp:variable name="b" />' />
Code is topiary
Offline
Re: Concatenating with <txp:variable />
Thanks for your help.
The single tags work.
Hacking adi_calc and adding a few string operations made it easier too. (Prefix & Suffix)
Cheers
Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: Concatenating with <txp:variable />
Hi folks.
It seems <txp:variable>
can manipulate only string values.
Do you think we can change the values to manipulate integers?
Best regards,
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Concatenating with <txp:variable />
Pat64 wrote:
It seems
<txp:variable>
can manipulate only string values.
See adi_calc for arithmetic with txp:variable.
Last edited by Bloke (2009-03-07 16:41:20)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Concatenating with <txp:variable />
As always, a good advice Stef :))
Tks.
Another question :
What is the impact of plugins into a front-end TXP website performances?
I know TXP 4.0.7 includes a new loading feature for plugins. Combinate with your/Yura/Steve ied_plugin_composer we can manage ressources.
Some infos will be appreciate.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Concatenating with <txp:variable />
Pat64 wrote:
What is the impact of plugins into a front-end TXP website performances?
OT: how long is a piece of string :-P
It depends on:
- the plugin code — if it does a lot with callbacks or does little in addition to when it is used in your templates
- the plugin type — only Client+Admin type is loaded now, with Library plugins loaded only if required. The database index helps
- the plugin size — bigger plugins probably take longer to read, though not by much (but use the large smd_ plugins as a last resort!)
- if the plugin begins with rvm_ or wet_ — they nearly always use a tonne of core features that us lesser mortals have to find first, and those plugins tend to be very small, very fast and totally focused on the job
Last edited by Bloke (2009-03-11 12:55:57)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Concatenating with <txp:variable />
Ok. Tks Stef.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Concatenating with <txp:variable />
lol
I think, therefore I AM, … … er … I think :-?
Offline
Pages: 1