Site structure
Version 5.x > Site structure > how to use 2 pagepalceholder web part in a root page? View modes: 
User avatar
Member
Member
mj-y - 4/4/2013 4:57:31 AM
   
how to use 2 pagepalceholder web part in a root page?
Hi
I have a root page with 2 PagePalceHolder web part (in 2 different zone) ... but just one of them can be shown in same time! how can I use both of them?

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 4/4/2013 5:13:19 AM
   
RE:how to use 2 pagepalceholder web part in a root page?
Hi,

Unfortunately this is not possible in the 5.0 version of Kentico. This option was added in 5.5 (in a prototype mode) and then in 6 version in a full tested manner. There is a blog that describes working with multiple placeholders here

Kind regards,
Richard Sustek

User avatar
Member
Member
mj-y - 4/6/2013 6:40:05 AM
   
RE:how to use 2 pagepalceholder web part in a root page?
thx for your usefull link.
I use 5.5R2 version.
I read the blog post and used the code below in my root page(master page), but by using this code in root page, not only the page placeholder webpart but also any othe webparts not shown in subpages...

<cms:CMSContent runat="server" id="cntLeft" PagePlaceholderID="plcLeft">
<cc1:cmswebpartzone id="pageTitle" runat="server" />
</cms:CMSContent>

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 4/8/2013 1:20:29 AM
   
RE:how to use 2 pagepalceholder web part in a root page?
Hello,

And what level of Inheritance are you using on those documents?

Best regards,
Martin Danko

User avatar
Member
Member
mj-y - 4/8/2013 2:09:24 AM
   
RE:how to use 2 pagepalceholder web part in a root page?
My site just have a master page (the first page in left list)... so it's in first level ...
you mean this code don't work in first level?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 4/8/2013 2:18:11 AM
   
RE:how to use 2 pagepalceholder web part in a root page?
Hello,

No, I mean, the inheritance of the documents, where you don't see the Web Parts... are they inheriting from your Master Page?

Best regards,
Martin Danko

User avatar
Member
Member
mj-y - 4/10/2013 3:18:51 AM
   
RE:how to use 2 pagepalceholder web part in a root page?
Hi dear Martin
yes they inherit from my masterpage ....
concider that they work well with just one simple page placeholder (whitout using the code from blog).
oh I think explained it badly...
explain it again:
at the first I just used one page placeholder in mastrepage, and I added some webparts in sub pages. after that I used the code from the blog in masterpage and the webparts in subpages (that were placed in placeholder not all of them) disapeared ...

User avatar
Member
Member
kentico_sandroj - 4/27/2013 1:03:23 PM
   
RE:how to use 2 pagepalceholder web part in a root page?
Hi,

Thank you for providing that update. There are a few notes in the blog post that may describe the cause of the issue:

Any CMSContent part that doesn't find the placeholder with the defined ID is hidden by default.

You may optionally set the CMSContent to be displayed even when target placeholder is not found, in that case it will be displayed in default placeholder. You can use it in case you combine multiple placeholders templates with single ones.

<cms:CMSContent runat="server" id="cntNotExist" PagePlaceholderID="plcNotExist" ShowWhenTargetNotFound="true">

If you want to propagate placeholder from master page to some deeper level than the immediate one, all templates on the path to it must contain such placeholder (the system needs to know where it belongs). The CMSContent sections searches the placeholder only on the same level of visual inheritance.

If these note do not prove to be helpful, please provide a copy/paste of the entire block of code so that we may take a look.

Thanks,
Sandro