Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
restrict generate area
Bhargav Coca
I was curious as to how to restrict content contributers to generate a page to a certian folder in the workarea under "htdocs" Please help anyone.
Thank you
Find more posts tagged with
Comments
Lozza
In templating.cfg, it's specified by the directory element - something along the lines of the following:
<template name="Template.tpl" extension="html">
<locations>
<branch vpath-regex=".*" preview-dir="/iw_preview">
<directory dir-regex="htdocs/" />
</branch>
</locations>
</template>
Bhargav Coca
Nope it doesn't work that way, here is a small snippet.
<data-type name="News Details" dcr-type="iwov">
<presentation>
<template name="news1.tpl" extension="html">
<locations>
<branch vpath-regex=".*" preview-dir="/templatedata/iw_preview">
<directory dir-regex=".*"/>
</branch>
</locations>
</template>
<template name="news2.tpl" extension="html">
<locations>
<branch vpath-regex=".*" preview-dir="/templatedata/iw_preview">
<b><directory dir-regex="htdocs/docs/News"/></b>
</branch>
</locations>
</template>
</presentation>
</data-type>
Lozza
Odd.
Just to make sure, did you try to generate into htdocs/docs/News rather than just preview? (obvious, apologies)
And sure you've selected news2 from the Form Settings dialogue, and you're not using news1? (ditto)
And the <b></b> tags in your post aren't in your templating.cfg? (may as well make a threesome)
I've just tried the following example, and I get a moan-box when I try to generate anywhere other than under test/Test1/test2
<data-type name="Test" dcr-type="iwov">
<locations>
<branch vpath-regex=".*"/>
</locations>
<presentation>
<template name="Test.tpl" extension="html">
<locations>
<branch vpath-regex=".*" preview-dir="/iw_preview">
<directory dir-regex="test/Test1/test2" />
</branch>
</locations>
</template>
</presentation>
</data-type>
Bhargav Coca
Thank you so much, It works. Just more curious, can't we make the landing directory (initial_directory) be test/Test1/test2.?
Thank you again
Adam Stoller
This is a long-standing request / item-of-confusion regarding the templating.cfg settings -- they are used for validation not initialization and thus do not provide the functionality you are looking for.
The best way I know of to do this is to control all page generation through workflow automation and not allow the users to run the default OOTB menu items / links/ buttons / whatever.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Bhargav Coca
Thank you fish