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)
Inline element - no nesting
alanhill
All,
Am I the only one that thinks not allowing nested inline commands is really poor?
We use them for allowing generic code libraries - collections of often used elements that can be dropped into datacapture.cfg files, allowing a lot of saved time when creating new templates.
I've created one for example which holds a list of 'Popup Options' for when a link wants to open a popup window - the library contains the standard options - scrollbars, addressbar, heigh and width etc.
I've not created a choice element that allows the users to select whether they want a navigation item to be text or graphic. The text and graphic elements themselves are also generic libraries, again allowing good re-use of code.
However when I try to add an Inline to go and get the text or graphic library code, because this library code already contains and Inline element (getting the popup options) it fails, and the documentation indicates that you can't have an Inline element within another Inline.
Examples of my datacapture.cfg (much simplified):
<container name="TextOrGraphic" location="TextOrGraphic" combination="or" min="0" max="5" default="1">
<label>Text or Graphic Content</label>
<description>
Click the '+' button to add more of these items as required. Choose whether
to add some text or a graphic. You can also make any of these items into
links to other web pages.
</description>
<item name="Text">
<label>Text</label>
<description>
Text
</description>
<text maxlength="45" required="t" size="50"/>
</item>
<item name="Gr">
<label>Gr</label>
<description>
Gr
</description>
<text maxlength="45" required="t" size="50"/>
</item>
<container name="Graphic">
<inline command="d:\system\iw-home\iw-perl\bin\iwperl y:\default\main\wwwsites\halifaxcouk\br_aboutonline\WORKAREA\wk_aboutonline\templatedata\www\65_test\include.ipl y:\default\main\wwwsites\halifaxcouk\br_aboutonline\WORKAREA\wk_aboutonline\templatedata\www\65_test\iBDTImageElement.cfg"/>
</container>
</container>
The iBDTImageElement.cfg file looks a bit like (with non-relevant bits cut out):
<item name="WindowType">
<label>What type of window?</label>
<description>
Do you want this link to open in the current browser window,
a new standard browser window or a popup browser window
(where certain properties such as window height and width can be customised)?
</description>
<radio required="t">
<option selected="t" value="parent" label="Same window"/>
<option value="standard" label="New standard window"/>
<option value="popup" label="New popup window"/>
</radio>
</item>
<container location="PopUp" name="PopUp">
<inline command="d:\system\iw-home\iw-perl\bin\iwperl y:\default\main\wwwsites\halifaxcouk\br_aboutonline\WORKAREA\wk_aboutonline\templatedata\www\65_test\include.ipl y:\default\main\wwwsites\halifaxcouk\br_aboutonline\WORKAREA\wk_aboutonline\templatedata\www\65_test\iBDTPopupOptions.cfg"/>
</container>
The iBDTPopupOptions.cfg file then looks like:
<label>Popup Options (if applicable)</label>
<description>
Use these options to set the size and the functionality available in a popup window.
Accessibility is also covered, since a non-script dependent link will be shown
if the user's browser does not support/run Javascript.
</description>
<item name="Resizeable" rowcontinue="t">
<label>Resizeable</label>
<description>Should the user be able to resize the popup window?</description>
<radio>
<option selected="t" value="0" label="No"/>
<option value="1" label="Yes"/>
</radio>
</item>
<item name="Scrollbars">
<label>Scrollbars</label>
<description>Should there be scrollbars in this new popup window?</description>
<radio>
<option selected="t" value="0" label="No"/>
<option value="1" label="Yes"/>
</radio>
</item>
... and so on
When I try to present that on screen, I get the message "Invalid Element: inline cannot appear at this level."
However when I comment out the inline command within iBDTImageElement.cfg it works OK (but obviously does not display any popup options).
If this is the case then it seems a real c*ckup on the part of Interwoven - meaning a lot more duplication of code and effort to create new dcts.
Any advice, thoughts etc would be appreciated.
Teamsite Template Developer
Find more posts tagged with
Comments
Adam Stoller
If you search through the forums, you will see other threads on this subject and possibly (though possibly not) some code for how to do this.
You can certainly file a feature request for this functionality if one hasn't already been filed (or add your organization to the filed one if such exists) - which is the most likely way to see this eventually "fixed".
Probably the biggest concern in any such implementation is how to detect and gracefully deal with an endless loop of inline inclusions... (e.g., inline-A includes inline-B which includes inline-C, which includes inline-A again, and inline-D, which includes inline-B again)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
kvargas23
Does anyone if this was ever addressed by Interwoven? I am trying to do the exact same thing and save coding time by using inlines to include DCT segments. however those themselves also have inlines built in.
I have searched all over the boards and found no code or examples of how to circumvent this problem of inlines including inlines.
Anyone have any pointers?
thanks,
Keith.
nipper
Yea I do this all the time, however you have to handle it differently.
My main DCT is an inline that runs iwperl buildDCT.ipl
In buildDCT.ipl I cannot use an inline and really do not need to. Because that already is an inline. I build up the XML required with (typically) a Perl module and just include that with the returned XML.
This sounds convoluted but if you want to post some code I can show you easily.
kvargas23
I figured out how to do this using a Perl script that cycles through the included DCT elements and for each line that is an inline callout, simply runs the actual inlines.
The code is attached for those who may find it useful. There is some overhead in there, debugging stuff left in there, but its easy to get the drift.
Keith