Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2020-07-02 17:06:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Getting a txp:variable that's been set in article body... possible?

philwareham wrote #324193:

FYI I tried Stef’s <txp:custom_field name="body" /> suggestion but that output actual contents of body.

Ah yeah, not what you want in this case.

Hiding the body seems to hide the variable too.

Odd, it works for me. Article body content:

<txp:variable name="testing">TESTING</txp:variable>

Default form:

<txp:hide process><txp:body /></txp:hide>
HAZ <txp:variable name="testing" />

<div itemprop="articleBody">
    <txp:body />
</div>

Output:
HAZ TESTING
… rest of body


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

Offline

Board footer

Powered by FluxBB