Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-05-27 09:39:12

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Use <txp:yield/> inside <txp:php>

I just stopped using smd_macros and started to achive the same with outputforms. Which works pretty well. Up to the point where in my outputfrom I need to use some php.

Unfortunately

<txp:php>echo = '<txp:yield name="something"/>'; </txp:php>

(this is just a simple example)
does not work.

With smd_marcos I could do

<txp:php>echo = '{something}'; </txp:php>

though.

Is there any workaround for that?

Offline

#2 2020-05-27 10:12:36

etc
Developer
Registered: 2010-11-11
Posts: 5,134
Website GitHub

Re: Use <txp:yield/> inside <txp:php>

You must parse it:

<txp:php>echo  parse('<txp:yield name="something" />');</txp:php>

Offline

#3 2020-05-27 11:26:17

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Re: Use <txp:yield/> inside <txp:php>

That worked! Thanks a lot.

Offline

Board footer

Powered by FluxBB