0
votes

I've two layouts for the website, one for public (default) and other for private area, that I created.

When I create a new page (it uses the Public Layoyt by default) and if I want it to be with private layout I need to change in the Presentation > Details.
The problem comes after, I have default renderings in the Private Layout that aren't inserted on it.

So, my questions are:

  • Is there any possibility to ask the user when he creates a new page to ask for the layout?
  • Is possible for the Default Renderings in Private Layout to come together when changing the layout?
  • Am I doing right with having two layouts in the same instance of sitecore?

Thanks in advance!

2

2 Answers

1
votes

Sounds to me like you should probably look into, creating 2 separate Page Templates.

  • Public Page
  • Private Page

These may inherit from common base templates.

Now, on each of these, configure Standard Values with the default presentation details you require - for the public and private layout respectively.

Alternatively (since I don't know exactly what you're trying to achieve) - Sitecore has something called Layout Presets. Described in section 3.6 here.

https://sdn.sitecore.net/upload/sitecore6/64/presentation_component_cookbook-a4.pdf

(very old document, but I do believe this still applies to current Sitecore releases)

0
votes

One more alternative would be to create 2 branch templates

  • Public Page
  • Private Page

Works similar to how you would do it from 2 separate page templates, but removes the need for having templates that are there purely for presentation.

Then set your default presentation for each type of page on the branch template item. You can also set things like security options etc... just like you might with the standard values of a page template.

As an advantage over page templates, you can also create a child structure if needed - so if you had a /assets folder that you needed for each page type, a branch template is great for that.