Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-07-03 09:56:43
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Output custom field in PHP?
Do I have to use it’s PHP handle or will this work?
<txp:php>
echo (@file_get_contents ("/home/username/public_html/events/<txp:custom_field name="FieldName" />"));
</txp:php>
Last edited by FireFusion (2007-07-03 09:56:54)
Offline
Re: Output custom field in PHP?
In php code you must replace txp tag by txp function
txp: custom_field become custom_field.
You can read this article to understund better.
A+
Offline
Re: Output custom field in PHP?
<txp:php>
echo @file_get_contents('/home/username/public_html/events/'.custom_field(array('name' => 'FieldName')));
</txp:php>
Last edited by ruud (2007-07-03 12:23:23)
Offline
#4 2007-07-03 12:51:27
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Re: Output custom field in PHP?
Thank you. Just what I needed :)
Offline
Pages: 1