seanzol Posted February 3, 2015 Posted February 3, 2015 Please forgive me, as I'm sure this is a stupid question, but I couldn't find the right combo of search terms either on Google or here.Previously, you could write a block of PHP by enclosing it in <php></php> tags, but now that doesn't seem to be the case, as it just spits out an HTML-commented copy of your code. What am I missing?
seanzol Posted February 3, 2015 Author Posted February 3, 2015 IPS4?{{$time = time();}} Yes, IPS4, sorry!Does that only work for one-line statements? It just spits out plaintext when I enclose a full code block.
Adriano Faria Posted February 3, 2015 Posted February 3, 2015 It seems. If you perform a search in .phtml files, you'll see a lot of examples like that:{{$idField = $comment::$databaseColumnId;}} {{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}}One line for each php line.Can't you do it on your php file and pass via variable to the template ?
seanzol Posted February 3, 2015 Author Posted February 3, 2015 It seems. If you perform a search in .phtml files, you'll see a lot of examples like that: {{$idField = $comment::$databaseColumnId;}} {{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}} One line for each php line. Can't you do it on your php file and pass via variable to the template ? Yeah, that's no big deal, it just seemed like an odd change to me. Thank you for your help
Recommended Posts
Archived
This topic is now archived and is closed to further replies.