2

Below is my sublayout called SectionWrapper

<section>
    <sc:Placeholder ID="phSectionWrapper" runat="server" Key="phSectionWrapper" />
    <a href="#">check this</a>
</section>

I want to achieve is multiple "sections" with different placeholders like

<section>
    <caraousal 1 />
    <a href="#">check this</a>
</section>
<section>
    <caraousal 2 />
    <a href="#">check this</a>
</section>

But it's now rendering as

<section>
    <caraousal 1 />
    <a href="#">check this</a>
    <caraousal 2 />
</section>
<section>
    <a href="#">check this</a>
</section>

My presentation details are configured on item as below:

  • SectionWrapper (with some placeholder)
  • caraousal1 (with placeholder as phSectionWrapper)
  • SectionWrapper (with some placeholder)
  • caraousal2 (with placeholder as phSectionWrapper)
Marek Musielak
  • 26,832
  • 8
  • 72
  • 80
Mohit Dharmadhikari
  • 3,750
  • 2
  • 20
  • 27

1 Answers1

1

Placeholder keys must be unique on the page. You cannot have 2 placeholders on the same page with the same key - Sitecore will not know in which of them should put the components.

Check Sitecore Dynamic Placeholders - from what I remember there are multiple implementations ready to use, e.g.:

Marek Musielak
  • 26,832
  • 8
  • 72
  • 80