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)
restricting location of generated pages
jwl
Hi,
Is it possible to restrict the destination of generated pages, in the way you can restrict the directory viewed by a Browser in DCTs? If so, how do I do this?
Thanks!
John
Find more posts tagged with
Comments
Adam Stoller
Yes ... and no.
The templating.cfg file can provide a regex that is used to validate the path of pages generated from the DCR of a specific cateogry/data-type with a specific PT - but it will not provide that valiation until *after* a path/name has been provided and an attempt to save the generated page has been requested.
The PT itself *could* derive the name of the generated page(s) from the DCR it is processing and use additional logic to determine the location for the generated page(s) - but since the TST EA's only get set on the page specified for output on the command line (or what's passed in via the selection made by the user through the GUI) - you would need to have additional code written to set the EAs on the actual generated files.
The tried-and-true method is to wrap the entire process within a workflow and disable Generate from the GUI - so that everything is controlled programmatically. Prior to TS6 this is done by using FormAPI code to override the default behavior of the Generate button in the DCT form and using iw.cfg to remove the Generate option from the menus. In TS6 there's a different config file (ui_custom.xml) used to remove the Generate option from the menus and you can control whether the Generate action exists on the DCT form via options specified within the templating.cfg.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com