Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#2 2004-04-19 07:27:12

Dean
Founder
From: Languedoc
Registered: 2004-02-14
Posts: 235
Website

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

#4 2004-04-19 08:37:28

Dean
Founder
From: Languedoc
Registered: 2004-02-14
Posts: 235
Website

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

#6 2005-08-03 19:34:53

kriskhaira
Member
From: Malaysia
Registered: 2005-02-22
Posts: 16
Website

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

Board footer

Powered by FluxBB