Pass data from one component to another in adobe CQ

前端 未结 3 1201
既然无缘
既然无缘 2021-01-06 16:23

I\'m using Adobe CQ5. I have made two components that are independent of each other. However, I want to use data from one component in the other one. How do I achieve this?

3条回答
  •  既然无缘
    2021-01-06 17:04

    There are a number of options, depending on how closely the components are coupled (e.g. will both always be placed on the page at the same time? Are they hard-wired into the template, or placed by the editors, etc.)

    If both components are on the same page, the simplest is probably to set a variable within one component & read it in another, e.g.:

    foo.jsp

    
    

    bar.jsp

    [Optional fallback value]
    

提交回复
热议问题