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)
Refer from 1 dcr to another Or 1 tpl to another
maggi
Refer from one dcr to another one Or one tpl to another one
I have a dcr where user will enter the product name and list of features (as a replicant). In the tpl I will show the product name and list of features selected by users.
Have another dcr where I select only the product name (select box), based on the product in the tpl I have to show all related features.
Any tips, code sample would be really helpful.
Find more posts tagged with
Comments
iwovGraduate
Not quite sure what you are asking or expecting.
You can include a TPL within a TPL using iw_include tag. See documentation for templating. There are a bunch of examples shipped with the product illustrating its use.
If each of your DCRs represent a product, you can point to related products in your DCR simply by having <browser tag which allows you to select a DCR path. You can get much more sophistacted with this. This also opens a whole can of worms such as validation, etc. since TS OOTB does not keep track of relationships among DCRs.
Can you explain in more detail what you are trying to do ?
maggi
Thanks for the reply and Sorry for the confusion. Let me make it clear.
I know I can include a tpl within a tpl, but I am trying a include a piece of it.
1) Features dct - Each feature is a separate dcr.
2) Product dct - where user will enter the product name and select couple of features (replicant - inline call out to pull all the features) as part of the other items. In this template I have product and features relationship.
3) Another dct - where user will select the product name as part of the other items. Now in theis page (tpl), I have a link for Features when you click on that link I have to show all the features (as a popup) for the selected product.
-Maggi
lhdavis
So are you saying that depending on the selection the user makes in the so-call "Another DCT", say product equals "TeamSite" for example, in your presentation template you would like to, based on this product selection, load the associated "product" DCR for the "TeamSite" product and the related "features" DCR for the "TeamSite" product?
So there is a one-to-one-to-many correspondance here - one "another" DCR -> one "product" DCR -> one or many "feature" DCRs. Do you use any naming conventions for the DCRs, example TeamSite_<feature>, or are you hoping to pull this information dynamically in your TPL to load the correct DCR?
Luke Davis
Open Technology Group, Inc.
luke.davis@med.va.gov
maggi
let me make it more clear...
In the product dct, I will have product name and related features (selected by users)..each features is a seperate dcr, so I have url's for all related features.
On the other dct, I will get input of product name only.user will not choose the features again. Instead of that I have to compile them in tpl based on selected product and referring the product dct to get all related features.
Maggi
Adam Stoller
I'll take a swing at this - though I think it's just re-hashing what's already been said:
[Feature DCR] => content regarding a specific feature
[Product DCR] => content regarding product + list of references to Feature DCRs
[Other DCR] => general content (?) + list of references to Product DCRs
PT for Other DCR outputs general content then, foreach reference to a specific product DCR:
- load the product DCR and display the product content + foreach reference to a feature DCR:
- load the feature DCR and display the feature content
Yes? So what you're looking for is iwpt_load_dcr() in your PT ?
I think you might find it easier to think of your PT in terms of Perl rather than XML - but that's me.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com