I have added @snippets and @uploads keywords that are recognized and fixed to actual paths on server (be it custom-defined or CMS-default). I'll use it to automatically create empty snippets files to bootstrap a new template, if those do not exist yet. Updated code in public repository.
For example:
- Code: Select all
<?php require_once( '../couch/cms.php' ); ?>
<cms:write "test.php" >
<cms:template title="Dynamic Form Generation" clonable="1" >
<cms:pages masterpage="test/index.php">
<cms:show_repeatable "form_fields">
<cms:editable name="<cms:show input_name />" label="<cms:show input_title />" type="<cms:show input_type />" order="<cms:show k_absolute_count />" />
</cms:show_repeatable>
</cms:pages>
</cms:template>
</cms:write>
<?php COUCH::invoke(); ?>
Should output in the "test.php" file (as content):
- Code: Select all
<cms:template title="Dynamic Form Generation" clonable="1" >
<cms:pages masterpage="test/index.php">
<cms:show_repeatable "form_fields">
<cms:editable name="<cms:show input_name />" label="<cms:show input_title />" type="<cms:show input_type />" order="<cms:show k_absolute_count />" />
</cms:show_repeatable>
</cms:pages>
</cms:template>
Regards,
GXCPL (CTR)