Page 1 of 1

Smarty in Static Contents

Posted: Mon Jun 05, 2006 10:18 pm
by DB
Hello,

I'm trying to use Smarty markup in my static pages "content" section. That is, place Smarty markup in the content editor box via the admin panel and have it be parsed. I tried the Smarty_markup plugin and had all the right boxes checked, it just wouldn't work. It would only print out my Smarty markup right on the webpage. Is this possible to do?

If not, might I be able to just edit a sort of "index.php?/pages/mypage.html" page somewhere? Where do I find these static files to edit them without having to use the admin panel?

Thanks for help!
Dan

Re: Smarty in Static Contents

Posted: Mon Jun 05, 2006 11:22 pm
by garvinhicking
Hi!

What Smarty code did you enter in your articles? Which versions of the staticpage plugin and smartymarkup plugin are you using?

Did you maybe enable the option "Disable Markup Transformations" for your staticpage? This checkbox needs to be unchecked to allow Markup parsings like Smarty MArkup to be performed.

It might help if you show us your screenshots of event plugin configuration, the smartymarkup pluginc onfiguration and a screenshot of the page where you maintain your staticpage?

Because, yes - what you want should work. :-)

Regard,s
Garvin

Configuration looks good

Posted: Tue Jun 06, 2006 12:07 am
by DB
Thanks for helping!

Yes, it looks like I have everything configured correctly. Here are a couple screenshots...

http://www.danielbickley.com/questionable/shots.html

I am running Serendipity 1.0-beta3 and PHP 4.4.1, have v3.35 of the Static Pages plugin, and v1.3 of the Smarty Markup plugin.

Maybe I can't use the {if $lang == 'de'} markup there? I'm using it on the index.tpl to pull some if/else stuff, and it seems to be working for me.

Thanks,
Dan[/img]

Re: Configuration looks good

Posted: Tue Jun 06, 2006 10:45 am
by garvinhicking
Hi!

The screenshot shows that you have set the "Perform MArkup Transformations" to "No". You need to set it to "Yes" to apply Smarty markup. :)

Regards,
Garvin

got it!

Posted: Tue Jun 06, 2006 2:21 pm
by DB
Thanks for the help.

It's working now. I had tried with the "Perform Markup Transformations" set to both "No" and "Yes" with no luck. I had been a little confused whether it meant yes it was enabled, or yes it was not enabled. I'm tired.

Anyway, thank you for confirming

I did get it to work though, by putting the Smarty markup in the Pre-Content box, rather than the Content box which is above. Then I just checked yes under the Content box to perform markup transformations...just in case someone else runs into this. So "Pre-Content" will be parsed, but not "Content". In my case anyway.

Thanks for your responses, now back to the grindstone :(
Dan