Page 1 of 1

Static pages - How to insert PHP code?

Posted: Mon May 04, 2009 11:35 am
by schimanke
Hi there,

I am currently trying to insert some php code which shows the content of an RSS feed on a static page in my s9y blog. Unfortunately instead of interpreting the code properly it is displayed as if it wasn't php code. You can see it here: http://www.schimanke.com/index.php?/pages/pagetitle.php

I have disabled the WYSIWYG-Editor in my settings but to no success. How can I get s9y to interpret the php code properly?

Re: Static pages - How to insert PHP code?

Posted: Mon May 04, 2009 12:33 pm
by garvinhicking
Hi!

You cannot use PHP directly. You can use the Smarty Markup plugin and then wrap your php inside a {php}...{/php} container. Note that when you use Smarty markup, all your entries that have { and } in it need to use {ldelim} and {rdelim} instead or they will produce syntax errors.

Also note that you might need to add

Code: Select all

<?php
$serendipity['smarty']->security = false
into the config.inc.php file of your used template directory, to allow the use of {php} tags.

In the s9y.org technical documentation you should also find some examples for this.

Regards,
Garvin