|
codeToStackPrependMethodPHP
codeToStackPrependWiki > Syntax > codeTo > codeToStackPrepend Parameters
Array of raw code, where key is the field. Array of fields from $codeArray which should be skipped. Callback triggered after every insertion. Three parameters are passed to this callback: DescriptionInjects raw executable code at the end of actually matched nodes. Method doesn't change selected elements stack. ExampleMarkup<node1> <node2/> </node1> <node2/> <node1> <node2/> </node1> Data$code = array( 'print "abba";', 'foreach(array(1, 2, 3) as $i) print $i' ); QueryTemplates formula$template-> codeToStackPrepend($code) ; Template<?php print "abba"; ?> <node1><node2></node2></node1><node2></node2><node1><node2></node2></node1> Template tree beforenode1 - node2 node2 node1 - node2 Template tree afterPHP node1 - node2 node2 node1 - node2 See alsoComments allowed |
Sign in to add a comment