Skip to main content
Level 2
fev. 18, 2016 1:23 PM UTC
Respondido

How to reuse created component resources to render a page

I add a component in one page. For instance, I drag and drop a Text & Image component.I edit that component with some texts and an image. Now, I need to reuse that created Text & Image component resource to render another page so that the same content can display automatically when the second page opens.There should be an easy way to achieve that, but I didn't figure it out. Any helps?

Thanks and regards,

Yy

Este tópico foi fechado para respostas.
edubey
edubeyResposta
Level 10
fev. 18, 2016 1:27 PM UTC

You can use OOTB reference component, drag this component where you want to refer previous author component

Take a look @ https://docs.adobe.com/docs/en/cq/5-6/wcm/default_components.html#Reference

5 Respostas

edubey
edubeyResposta
Level 10
fev. 18, 2016 1:27 PM UTC

You can use OOTB reference component, drag this component where you want to refer previous author component

Take a look @ https://docs.adobe.com/docs/en/cq/5-6/wcm/default_components.html#Reference

Traduzir
smacdonald2008
Level 10
fev. 18, 2016 2:00 PM UTC

As Praveen pointed out - you can use the Reference component. BUt if you do this and make a change - the change appears in the other page. When authoring pages - i prefer a 1-1 model. Each page has its own component so a change made in page 1 will not affect page 2. 

Traduzir
y_12Autor
Level 2
fev. 18, 2016 2:04 PM UTC

Is it possible to load created resources programmatically without manually dragging components to the pages? The page will dynamically display the component content based on the backend business logic.

Thanks,

Yy

Traduzir
edubey
Level 10
fev. 18, 2016 2:11 PM UTC

You can use

<cq:include path="path to your component node" resourceType="script that will render the componet example [1]" />

[1] apps/project/component/text

Traduzir
y_12Autor
Level 2
fev. 18, 2016 2:32 PM UTC

Yeah, that's exactly what I need. Thank you and Scott very much for your help.

Yy

Traduzir