I have tried to add a <?php ?> tag in an element but always it get commented like if wrote
it becomesCode:<?php echo "hello"; ?>
Code:<!--?php echo "hello"; ?-->
I have tried to add a <?php ?> tag in an element but always it get commented like if wrote
it becomesCode:<?php echo "hello"; ?>
Code:<!--?php echo "hello"; ?-->
Where exactly did you insert that code?
Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
Amazon wishlist
You can use PHP code only in PHP files or in Templates, not in any text fields of content elements, modules, articles etc.
As Spooky says, and you can import PHP into the BE e.g. into the RTE with an insert tag
https://docs.contao.org/books/manual...clude-elementsCode:{{file::myPHP.html5}} {{file::myPHP.php}}
ps My FF 39 did not scroll to the anchor #include-elements, chrome does. Don't know why.
Last edited by Andreas; 07/29/2015 at 16:21.
Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
Amazon wishlist
Bookmarks