Results 1 to 5 of 5

Thread: Possible to embed PHP code in CMS?

  1. #1
    User
    Join Date
    12-11-09.
    Location
    New York, NY USA
    Posts
    87

    Default Possible to embed PHP code in CMS?

    Hi All,

    Is it possible to run a code snippet from within a code element or other?

    I search on embed PHP code and did not turn up anything. The code element wraps the PHP in a <pre> tag which seems to defeat the coded execution.

    Thanks,

    C.

  2. #2
    User
    Join Date
    12-11-09.
    Location
    New York, NY USA
    Posts
    87

    Default Re: Possible to embed PHP code in CMS?

    I don't need to do this anymore. I just created a new layout and template and embed by code - but I'm still curious if its possible to embed PHP code.

  3. #3
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Possible to embed PHP code in CMS?

    Only using the {{file::mycode.php}} Insert Tag to link to a script in the Templates directory AFAIK.

  4. #4
    New user
    Join Date
    07-13-09.
    Location
    Shenzhen / China
    Posts
    20

    Default Re: Possible to embed PHP code in CMS?

    Quote Originally Posted by ramjet
    Only using the {{file::mycode.php}} Insert Tag to link to a script in the Templates directory AFAIK.
    Confirmed, I also had this issue and solved it with this insert... this loads up any file you want and goes around any of the security restrictions made in Typolight (sometimes that is necessary)... which also means you can just put 6 lines of php or java in the file and load it up as a fragment for when even a module is not sufficient for what you try to reach ~ :idea:

    article text source code < article custom html < module custom html < {{file::*}}

  5. #5
    User
    Join Date
    12-11-09.
    Location
    New York, NY USA
    Posts
    87

    Default Re: Possible to embed PHP code in CMS?

    Cool thanks.

    This will make for cleaner code and less mucking around with additional templates and layouts in my current hack. I suppose eventually I should reinvent the functionality with the catalog extension...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •