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)
VisualFormat Customization by Branch
Chad_Hayton
We are sharing datacaptures across several branches by using a INLINE to call the body of the datacaputre file from a central repository. This has worked great so far, but I now have a request to use different VisualFormat configurations in several of the branches. I can't just hard code this into the TEXTAREA tag as shown below because the same body code is used across several branches:
<item name="Article" >
<textarea external-editor="visualformat" external-editor-config="test1config.xml" </textarea>
</item>
Does anyone have any ideas on how I might assign the external-editor-config attribute dynamically? I've looked at FormAPI but it doesn't appear to allow me to set element attributes. Having our templates centrally stored has been a great help in managing the complexity of our sites given that the datacaptures are the same across the branches, but this is turning out to be a pain.
Thanks,
Chad--
Find more posts tagged with
Comments
gzevin
if you make the command that brings the DCTs via inline, a bit smarter, it will be able to understand the branch it is called from and put appropriate values for VF.
I mean, do not simply 'cat' the DCT, but do some parsing and substitution
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
ts_user
You can also call VFE as a callout instead of inline. When user clicks to Open VFE, you can get branch information in the CGI and call appropriate VFE configuration file.
Thanks,
~ts_user
Chad_Hayton
Thanks, Greg and ts_user. I've set up a script to do exactly this, but I'm not sure how I would make it aware of the branch it is being called from. I tried using Cwd to get the directory the script was being run out of but it returns the TeamSite application directory instead of the datacapture directory (which makes sense). None of the IW Perl modules look like they have any functionality that I could use in an IPL to determine which branch I'm calling the script from, so I've ended up hard-coding the branch name into the INLINE like this:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<inline command="iwperl E:\Apps\Interwoven\iw-home\custom\bin\processDCTBody.ipl
Y:\default\main\Intranet\Common\WORKAREA\CommonWA\templatedata\department\StandardWebPage\StandardWebPage_dct_body.xml Intranet"/>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ideally, I'd like to have the IPL determine which branch it is being called from rather than hard code it. Is there a way to do this or am I out of luck?
Thanks again,
Chad--
gzevin
Chad,
ever inline script will get a set of environment variables. If you RTFM'ed, you'd have found the following:
When a server-side inline callout program is executed, it inherits the following
environment variables:
IW_DCT: The file system path to the datacapture.cfg in use (for example, /iwmnt/
default/main/development/WORKAREA/maudlin/templatedata/press/events/
datacapture.cfg).
IW_ROLE: The role of the current data capture user (for example, editor).
IW_USER: The full user name of the current templating user (for example, andre).
IW_WORKAREA: The vpath to the current workarea (for example, /default/main/
development/WORKAREA/chris).
so, you DO have what you need
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
Chad_Hayton
Greg,
Thanks for your post. Looks like I focused too much on the Perl modules and didn't think to check environment variables (duh). Thanks for pointing me in the right
direction.
Chad--