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)
An include for datacapture.cfg?
cuteaimeeh
Hiya,
I have a large section of code from a datacapture.cfg that will be used on a number of other datacapture.cfg's throughout the site.
I don't want to cut and paste all of them. What if there are changes across the site?!?! :-P
Is there a way to use an include of sorts? I was thinking an in-line callout, but those live within an <item>, and will deem my datacapture.cfg invalid if I would suck in a bunch of other containers and items in the wrong order.
Perhaps using javascript, but on what action? On load? If so, wouldn't I still have to include the large chunk of code in the datacapture.cfg anyway?
The other parts of the datacapture.cfg's are drastically different and require separate data storage areas, so I can't really bundle everything into an uber DCT.
Thanks in advance for any thoughts.
Aimee :-)
Find more posts tagged with
Comments
Adam Stoller
How large is the large section? If it gets beyond a certain limit (3096? characters) I don't think inline's will handle it.
How monolithic is the re-use of the section? Will it always be used as is all in one place, or will pieces of it be used interspersed with other DCT-specific chunks of code?
What "kind" of code is it? Is it code to manipulate fields based on other fields, or code to implement fields that are essentially static?
My guess is that you will probably end up with a combination of inlines and javascript code and that the other DCTs will use the 'common' code in chunks.
--fish
(Interwoven Senior Technical Consultant)
LabelsTopBottom.ssd.zip
7041.pdf
herald10
Why don't you write a perl script that automatically appends the common content to that datacapture.cfg.
james1
The <inline> facility is intended to serve as an inline-include mechanism. <inline> elements can appear *anywhere* within a Templating DCT, not just within <item> elements.
However server side inline callouts do introduce some overhead every time a DCT is accessed (to edit or view a DCR in the Templating GUI). If that is a problem for you, you could also set up a make-based build system to generate your DCTs. You'd only have to rebuild whenever you edit your DCTs. If you want to be lazy but complicated, you could use workflow to kick off make.
-- James
--
James H Koh
Interwoven Engineering
Demo.dcpackage