Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
SETTING OUTPUT FILES PATH IN TEMPLATING.CFG
Veneet_Kumar
Hi all,
I have got the following code in the templating.cfg. and I would like to know , how can i set the path for a tpl file, so that everytime a new output HTML file is created, it is automatically saved at a particular location.
The code in the templating.cfg is as under :
<data-type name="NavigationPage" dcr-type="iwov">
<presentation>
<template name="NavigationPage.tpl" extension="html">
<locations>
<branch vpath-regex=".*" preview-dir="/">
<directory dir-regex="documents/CM_Templates/NavigationPage" />
</branch>
</locations>
</template>
</presentation>
</data-type>
By using this line ; <directory dir-regex="documents/ab/cd" />, I have set the validated output file to a particular location, and now it noly allows the user to save the output file here. But what I need exactly is that it shud save the DCR to a particualar location. How can I set this in the templating.cfg
Find more posts tagged with
Comments
Migrateduser
Dont think you can. You can only say where it is allowed to be saved.
pammi
Hi,
Are you able save in particular location instead of drilling down to folder
If so pls. post how you specified the path
Thanx in advance
StreamServe Templte.jpg
Sri
Hi,
If you want to restrict the location of the output file, you can do this by: [copied the snippet from earlier post]
----
<branch vpath-regex=".*" preview-dir="/">
<directory dir-regex="documents/CM_Templates/NavigationPage" />
</branch>
-----
This tells the FormsPublisher to allow the user to save the output file in only in documents/CM_Templates/NavigationPage/ but no where else. However, this does not mean that outputfile name is also specified automatically. User will still have to supply the output file name.
It'd be nice if there is a FormAPI event for 'onGenerate'. I'd think these sorts of things can be easily done with that.
Sri
pammi
Thanx for your reply
I have like below in templating.cfg
<template name="pr1.tpl" extension="html">
locations>
<branch vpath-regex=".*" preview-dir="/">
<directory dir-regex=".*" />
</branch>
</locations>
</template>
i modified to
<template name="pr1.tpl" extension="html">
locations>
<branch vpath-regex=".*" preview-dir="/">
<directory dir-regex="templatedata/genhtml" />
</branch>
</locations>
</template>
when i modified it is not showing any of tpl 's to generate
Thanx in advance
StreamServe Template1.jpg
Sri
That is kind of strange!
Do you see any errors in log file? Which release you are on?
I can take a quick look at your templating.cfg to see if there is anything obviously wrong, if you can post it (if possible, I guess). Otherwise, the best course of action is to contact support.
Sri
pammi
Pls. check my templating.cfg i am using TS4.5
In attached templating.cfg i am trying add path to pressreleasedata type
Thanx in advance
pammi
Pls. check attached cfg file
Sri
Hi,
This might or might not be the cause of the current problem that you are getting, but when I ran iw-home/bin/iwxml_validate.ipl on your templating.cfg, I get the following errors. [Ofcourse, I uncommented out the DOCTYPE declaration that points to templating4.5.dtd]
------------
undefined attribute [dcr_type] Element data-type line 195 column 1 byte 5539
undefined attribute [dcr_type] Element data-type line 197 column 1 byte 5602
undefined attribute [dcr_type] Element data-type line 199 column 1 byte 5662
undefined attribute [dcr_type] Element data-type line 201 column 8 byte 5740
undefined attribute [dcr_type] Element data-type line 203 column 8 byte 5811
undefined attribute [dcr_type] Element data-type line 205 column 8 byte 5887
ERROR: templating.cfg was not a valid XML file
------------
First you might want to correct these errors.
Second, try moving the definition of the template "pr1.tpl" to last in the list. (right now it is the first). I remember seeing a similar bug long time ago. If this doesn't help, then please contact support.