PHP XTemplate Forums
- Do tag callbacks actually work in 0.4.0 ?
by claw123 (Posted Tue Oct 07, 2008 5:25 am)
Thanks for replying to my thread. Due to corporate policy, I am unable to use the latest development from the subversion repo in our production environments. Is there a release date for the next stable release?
- PHP5 Constructor
by Jeremy (Posted Wed Sep 17, 2008 1:37 pm)
Try the latest version in Subversion - the constructor has had work - you now (optionally) pass in an array of options.
Simply pass 'autosetup' => false as part of the start up array, then set the filename, then call the ->setup() method. That should deal with your issue.
- Comment delimiter and spaces in tags
by Jeremy (Posted Wed Sep 17, 2008 11:45 am)
matbeard wrote:Firstly, when assigning tags with an array such as {tagarray.index name} spaces in the indexname cause the tag not to be assigned. This wasn't the case in previous versions and could cause a lot of problems.
To my knowledge this has never been a feature and would certainly be an issue with the current regex matching within the code.
matbeard wrote:Can you please give me a clue as to how to change the comment delimiter and allow spaces in the tag index name?
There are examples of this in the example files you download with XTemplate releases. e.g. ex9.php you need to stop the 'autosetup' feature running by turning off the 5th parameter to the constructor (or in an array passed as the first parameter), setting your changed delimiters and then manually calling the setup method.
- Code: Select all
$xtpl = new XTemplate('index.xtpl', '', null, 'main', false);
$xtpl->tag_start_delim = '{{';
$xtpl->tag_end_delim = '}}';
$xtpl->setup();
- Xtemplate OOP Questions
by Jeremy (Posted Wed Sep 17, 2008 11:37 am)
Look out for the new version I'll be adding in a day or two, I've implemented the ability to assign an object - it will deal with all public parameters within the object as it foreach's around the object.
HomePage
There are no comments on this page. [Add comment]