Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2004-04-18 19:52:54
- MattM
- Member
- Registered: 2004-04-16
- Posts: 11
How do I parse txp tags that appear in php includes?
Hello again,
My site relies heavily on php includes so that I have full control over the way the site looks (very basic template management). Even in pages controlled by textpattern though, the txp that are called in php includes aren’t being parsed (for example, the recent headlines tag). Is there a way this can be forced?
Thanks,
Matt
Offline
Re: How do I parse txp tags that appear in php includes?
At the very top of your page template, before anything else, try putting the following:
<?php ob_start('parse') ?>
text*
Offline
#3 2004-04-19 08:25:38
- MattM
- Member
- Registered: 2004-04-16
- Posts: 11
Re: How do I parse txp tags that appear in php includes?
Thanks, but that didn’t work. The only trouble I’m having now is when txp tags are appearing in txp pages (article, archive etc). They’re just not being parsed. Tis very odd.
Offline
Re: How do I parse txp tags that appear in php includes?
Then what I’d suggest is you use forms instead of PHP includes for managing template parts. Forms can include PHP as well as Txp tags. Example: create a misc form called ‘sidebar’, then include it on page templates like so:
<txp:output_form form="sidebar" />
text*
Offline
#5 2004-04-19 08:39:31
- MattM
- Member
- Registered: 2004-04-16
- Posts: 11
Re: How do I parse txp tags that appear in php includes?
Good idea. Thanks very much.
Offline
Re: How do I parse txp tags that appear in php includes?
I was just asking about this in #textpattern.
<code><?php ob_start(‘parse’) ?></code> worked fine for me.
Offline
#7 2006-02-14 06:59:18
- Shaliza
- Member
- Registered: 2006-01-22
- Posts: 59
Re: How do I parse txp tags that appear in php includes?
I was just about to ask about this. The PHP include worked for me as well.
Offline