Page 1 of 1

Newbie: How do I add php code to a new page (easy question)

Posted: Sun May 18, 2008 3:54 am
by outasight
Folks,
      I'm new to php and new to cmsms; I have a simple question that I'm sure you all know the answer to.  After I create a page in cmsms, how do I add php code to it?  I've tried adding it in the "metadata" area of the "options" tab but that doesn't work.  So where do I add it ?

      Also, if anyone knows of a concise document where a question like this is addressed, please point me to it (along with info on how to use the debug output in cmsms).

thanks...

Re: Newbie: How do I add php code to a new page (easy question)

Posted: Sun May 18, 2008 3:57 am
by Nullig
Here is the info, from the documentation, on inserting code.

http://wiki.cmsmadesimple.org/index.php ... fined_Tags

Nullig

Re: Newbie: How do I add php code to a new page (easy question)

Posted: Sun May 18, 2008 5:06 am
by outasight
hmm...
    I'm working with a login application coded in php and trying to call a logout function (defined in the login applications code "function_name()" below) from a link in a page created in cmsms.  I tried putting the code below into a tag and then calling the tag from the page using {tagname} but it doesnt work ...here's what I put in the user defined tag:

echo '">Logout';

    ... but it doesn't work.  What's going on?

Re: Newbie: How do I add php code to a new page (easy question)

Posted: Tue May 20, 2008 5:33 pm
by Pierre M.
Hello,

beware when you allow $config['use_smarty_php_tags'] in config.php
You might prefer the Front End User (FEU) and Custom Content (CC) modules instead.

Pierre M.