I would like to be able to run php in a template morsel. Is this possible?
Good morning!
Someone will help you with this on Monday. It could be this weekend, but let’s shoot for Monday.
Hi Anthony,
This currently isn’t possible yet… sorry.
We have plans to add this in the future though
run php in a template morsel
I second this request!
Also seconded. Thanks Kelsey.
I’m guessing this still isn’t available, right? Any plans? This thread is from 2010 so it’s been some while (he says, quietly hoping).
Hi Jim,
Did a quick test by echoing text through PHP, and nothing renders in the morsel. I made a note of this feature request, though
Thanks Nicolas - you did the same as me by the look of it. Am actually struggling to see where I can use Template Morsels for the site I just bought it for. Nearly all of my code includes at least a bit of php here and there…
Maybe look into making some of that PHP code into a plugin? There are a few blog posts on the net discussing this approach. Also, there might already be a third-party add-on that can replace your PHP code. The EE forums might also have ideas and suggestions in some cases. It really depends on your PHP code I guess, though
Thanks Nicolas. If the worst comes to the worst I can always use Template Morsels on another site instead
Just going to pop in here for a moment as this is on our list of feature requests we are evaluating for the next release. You can still put PHP into an Embedded template that is then inside the Template Morsel. Also, we are putting in a new {exp:template_morsels:escape} tag, which will allow escaped content in the morsel that can then be processed by the Template parser. PHP on Output would work in this case.