Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-23 23:09:37

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Pass custom field into PHP block?

Anyway to get this to work?

<txp:php>
$album = $director->album->get(<txp:custom_field name=“custom1” />);
</txp:php>

Best wishes
Lee

Offline

#2 2008-05-23 23:12:11

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

Re: Pass custom field into PHP block?

<txp:php>
$album = $director->album->get(custom_field(array("name" => "custom1")));
</txp:php>

?? Pretty much all TXP functions are called the same as their txp: counterparts.


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

#3 2008-05-23 23:16:51

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Pass custom field into PHP block?

Thanks very much.

Offline

Board footer

Powered by FluxBB