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?
Static pages - How to insert PHP code?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Static pages - How to insert PHP code?
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
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
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
In the s9y.org technical documentation you should also find some examples for this.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/