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)
Dynamic Creation of Category and DCR-Type for a DCR-Datum
Carl Artis
In our setup, we have multiple sites, deployed to the same LS runtime, We reuse components across sites, and style them differently, approx 10 sites.
Using a two sites example.
The sites are in different branches , and use different folder names for storing DCRs to avoid collisions.
i.e. templatedata/site1/Article/data , templatedata/site2/Article/data, templatedata/site2/Event/data
For the DCR-Datum, it requires the Category and DCT-Type in the component. The generator will not work for this as it will only work for SelectMulti or SelectSingle.
Is there any way to reuse the same component across my two sites and dynamically obtain the category and dcr-types for the drop down that the end user can configure?
For site1 it will display Category : site1 Type : Article
For site2 it will display Category : site2 Type : Article , Event
Any RTFM would be appreciated.
Thanks in advance
Carl
Find more posts tagged with
Comments
Rick Poulin
You should be able to specify multiple 'allowed' types for a DCR datum.. whether that causes more ruckus, I'm not sure so you'll have to try it.
I do kinda question your decision to build different categories like this, if the type is always going to be the same across all sites. You might have been better off with (or you might need to change your solution such that) a common datatype but different subfolders under 'data', and using permissions and/or training to ensure your users save the records in the proper folder name.
/I say it might've been better because there are certain situations where you may experience similar or worse pain as a result of this design
Topic_39034__XML_Scripted Data Source_using_E4X__cwong.rptdesign
Carl Artis
Rick
So in my example you suggest that I code as the
Category : sites1, site2
DCR-Type : Article,Event
I'll try this approach.
Unfortunately I think we could be too far down the path to restructure the storage of DCRs.
Thanks for the quick reply.
Carl
Faizi
So in my example you suggest that I code as the
Category : sites1, site2
DCR-Type : Article,Event
You should keep your Category and Data-type as same throughout the different branches but you should maintain the a 'sitename' directory inside the 'data' folder so that you can differentiate the DCR. That should be handled at the time of saving a DCR.
In this way same component will work throughout the different branches.