Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP on Pages
#6
ccagle8 Wrote:I prefer krisu's method because I feel it's just cleaner when there is a lot of PHP that needs to be inserted.

This is not possible, if you want to include the dynamic part within the page content (text before and after the dynamic content). And - as krisu mentioned - a pain, if you have multiple template files and need to change them - and change them you WILL ;-)

ccagle8 Wrote:If you are just needing to add one PHP <?php ?> tag into your content, then PHP-Exec is the way to go.

That's only possible, if the user who's editing pages has a basic idea of PHP. Otherwise I'd rather create a component with the code and tell him to use {% mycomponent %} to include it anywhere he wants.

Also, if it's used multiple times and you put it into one component, you only have to change it once. And before you argue about that: The user WILL request a change and you WILL have to change it ;-)

ccagle8 Wrote:Anything more than that I would suggest creating a new template.

See first option.

So my favorite is the DynPages plugin ;-)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
PHP on Pages - by ePirat - 2011-03-21, 15:21:39
PHP on Pages - by mikeh - 2011-03-21, 15:27:02
PHP on Pages - by mvlcek - 2011-03-21, 16:35:57
PHP on Pages - by krisu - 2011-03-21, 19:38:18
PHP on Pages - by ccagle8 - 2011-03-21, 22:28:04
PHP on Pages - by mvlcek - 2011-03-21, 23:23:54
PHP on Pages - by ccagle8 - 2011-03-21, 23:51:54
PHP on Pages - by ePirat - 2011-04-23, 01:12:33



Users browsing this thread: 1 Guest(s)