Content item design question

We have a scenario where we are trying to include a content item on multiple pages.

eg:-

twcReference content type has id, uri, params child table. The child table that has two fields paramName, paramValue.

The parameters of the child table can slightly differ from one page to another, while rest of the data remains the same.

Is there a way to make this work by not having to duplicate the content item by page?

We tried couple of solutions like trying to attach an override attribute for the content item at page assembly.

(twcReference template including an overrideSlot that accepts an attribute content type having a child table params)

This did not work because the content item somehow clings to the attributes.

Please let me know alternate ways we can resolve the issue.

thanks
geetha

Geetha,I didn’t quite understand the example you gave and how the child table fits into the picture. However, the first question I would ask is if inclusion of this shared content item on multiple pages is author-controlled or can it be “baked” into the template. If it is the latter, this is easy to do by writing an automated slot that returns only the content item included and then the slot will render it according to whatever snippet template you choose. I can give you the details on how to do this if you need them.If this inclusion of the content item is author-controlled in some way, then it gets a bit trickoer and it depends on what kinds of relationships exist between the content items in question. I could brainstorm some ideas if I knew more about your situation.Thanks,Duane

Hi Duane, thanks for your reply.

We have a page content type whose template includes a slot that allows twcreference content type baked in the template.

the twcReference content type includes like-

id : 12345
uri : /jspf/test.jspf (location of the module to render)

params (child)

we are passing some key, value pairs (paramName, paramValue) .
eg: moduleTitle News Tweets

When we assemble this item in assembly, we want to be able to re-use the same twcReference content item but pass slightly different parameter for module title when placed on a different page (say New Tweets for Region).

Any insights you can provide is highly appreciated.

thanks
geetha

Ah, I think I understand your question. Instead of using the name/value pairs from the params child table, you want to use other values in certain situations. am assuming that now you are using a “vanilla” slot that renders the twcReference content item using a snippet template? What you could do is use the #initslot macro to create a custom rendering of your twcReference content item. Within the #initslot, you can write code that renders the slot however you like, using or not using snippet templates and incoporate whatever business logic determines whether to use the values from child tables or some other values. I can give an example, but there are plenty to be found on this forum if you search on “initslot”.[QUOTE=Geetha;18999]Hi Duane, thanks for your reply.We have a page content type whose template includes a slot that allows twcreference content type baked in the template.the twcReference content type includes like-id : 12345uri : /jspf/test.jspf (location of the module to render)params (child)we are passing some key, value pairs (paramName, paramValue) .eg: moduleTitle News TweetsWhen we assemble this item in assembly, we want to be able to re-use the same twcReference content item but pass slightly different parameter for module title when placed on a different page (say New Tweets for Region).Any insights you can provide is highly appreciated.thanksgeetha[/QUOTE]

Thanks Duane, I got pulled into some other task, but I will work on this idea, thank you!