Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Multiple pages in a single page View modes: 
User avatar
Member
Member
huber-soapcreative - 7/25/2012 3:56:00 AM
   
Multiple pages in a single page
Hi,

I'm looking to have multiple documents be displayed within one master page. I'm aware this can easily be done by having multiple page placeholders on the master page, and set the path of each page placeholder to a specific page. Rather than this, I would like to be able delete and add child pages as I please without having to modify this master page.

Therefore, what I've done is create a repeater, which finds all child pages, and builds a page placeholder webpart within its transformation. This is working well, but the problem I've ran into is within each child page, the scope of the current document is lost. They all return the parent master page's NodeAliasPath.

Is there a better solution to achieve what I'm looking to do?

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/25/2012 11:04:52 AM
   
RE:Multiple pages in a single page
What you are describing that you are trying to do sounds very strange to me. Can you explain with a little more detail your purpose for displaying more than one page in a master template? That really isn't what it was designed to do, even in the core .Net framework.

The way that the mutliple page placeholders on a master template are supposed to work is to give you the ability to split up the page template markup so that you can have something that is essential like this in the master page:


<div id="TopPartOfMasterTemplate">
Content that will be rendered on all pages that use this master template
</div>
<asp:PageContentPlaceHolder id="UnderTopContent" runat="server"/>
<div id="MiddlePartOfMasterTemplate">
Content that will be rendered on all pages that use this master template.
</div>
<asp:PageContentPlaceHolder id="UnderMiddleContent" runat="server"/>
<div id="BottomPartOfMasterTemplate">
Content that will be rendered on all pages that use this master template.
</div>


And on the page that uses that master template, you can have two content controls:

<asp:Content id="Content1" runat="server" ContentPlaceHolderID="UnderTopContent">
This content will appear under the top content
</asp:Content>
<asp:Content id="Content1" runat="server" ContentPlaceHolderID="UnderMiddleContent">
This content will appear under the Middle content
</asp:Content>


This allows you to use a master template to define not only the top and bottom parts of a page, but anything in the middle. It is not, however, intended to be used to display the content of multiple pages.

Could you explain more about what your intentions are and possibly even attach a screenshot for us to see? (use something like imageshack.us to host your image)

User avatar
Member
Member
huber-soapcreative - 7/25/2012 7:25:14 PM
   
RE:Multiple pages in a single page
Thanks for your reply,

I'm building something like this page: http://www.soleilnoir.net/believein/#/start

Although each panel / "page" will have a template associated with it. Ie. One page will have a 2 column template, another page a 3 column template. There will roughly be a dozen templates, and many pages using each template.

Keeping all the javascript stuff aside, how would you go about building that assuming you had to display a group of a dozen pages / panels, each using a template that you can modify, which will affect any other page using that template?

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/28/2012 5:57:35 AM
   
RE:Multiple pages in a single page
Hello,


you can use a listing web part (i.e. repeater) and specify a special transformation. If the listed document meets a condition (e.g. a type stored as a document type field), it will use one layout, otherwise a different layout (so without using page templates and place holder).


Best regards,
Helena Grulichova

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/30/2012 4:03:40 PM
   
RE:Multiple pages in a single page
Like Helena said, you can create some documents with the fields you need. Make one of the fields use the HTML Editor so you can use that to add your content instead of using editable text regions.

Then you can create several of those documents and add a repeater to one page that outputs them the way you need.

That site is very interesting. I think they are using the HTML5 browser history push to change the url in the browser without refreshing the page. Gizmodo.com does this too when you click to view an article. It uses Ajax to load the article, but pushes the url to change without actually changing your browser location.

So, if you want to do do something like that, check this out https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history/