Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Mirror changes across multiple pages View modes: 
User avatar
Member
Member
mosa - 11/10/2010 8:15:41 AM
   
Mirror changes across multiple pages
I need to mirror or automatically copy changes on two pages. Or find a way to select a page else ware in the site without losing the place in the navigation.

For example, using the following navigation tree.

Main page

Section A- page
Subpage 1
Subpage 2
Subpage 3

Section B- page
Subpage 4
Subpage 5
Subpage 1

So subpage 1 will have the same text on it in both sections. But if the end user is in Section B and clicks on Subpage 1 I want them to stay in that area of the navigation (not move to Section A, Subpage 1 as a URL redirection does).

Is there a way to do this without manually copying the text?

Thanks.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 11/10/2010 2:49:27 PM
   
RE:Mirror changes across multiple pages
Hi,

you can create a linked document (click on Subpage1 + Ctrl + Shift and move the document to section B). The content of these two documents will be the same, but URL will be different.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
mosa - 12/1/2010 8:57:49 AM
   
RE:Mirror changes across multiple pages
Is there a way to make a linked web part only? Like a static text box? I would like to avoid creating a control. Thanks.

User avatar
Member
Member
mosa - 12/1/2010 9:50:37 AM
   
RE:Mirror changes across multiple pages
Or is there a way to change the document name? I would like to have two different document names in the navigation for each linked page.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 12/2/2010 6:05:02 AM
   
RE:Mirror changes across multiple pages
Hi,

Unfortunately, since linked document has the same database record the as original document it's not possible to rename it to have different name.

You could create new document with the requested name using the same page template as the original one. Since it will use same template their content (layout, webparts) will be shared. The content of editable webparts (editable text,...) will not, therefore I am not sure if this solution is appropriate for you.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
mosa - 12/2/2010 8:13:17 AM
   
RE:Mirror changes across multiple pages
Thanks.

You did get to the heart of it. All I really want is one block of text to share across two pages.

Is there a way to do this?

I guess we will need to use the copy function or a control.

Thanks again.

User avatar
Member
Member
Jeffrey H. - 12/2/2010 1:03:01 PM
   
RE:Mirror changes across multiple pages
Create a template as suggested, then use the Static HTML webpart in the template and put your shared html there. Static HTML webpart content is shared in the template, where EditableText webpart is per page.

Jeff

User avatar
Member
Member
DesignByOnyx - 12/2/2010 3:12:36 PM
   
RE:Mirror changes across multiple pages
Hey mosa, I had this same problem. So here is what I did:

1) Create a new document type called "Shared HTML"
2) Add a "name" (text) field and "html" (long text) field
3) Allow this document to be placed under "CMS.Folder"
4) Create a folder in your site tree called "Shared HTML"
5) Add a new "Shared Html" document(s)
6) Anywhere you want this text to appear, use a Repeater

Does this make sense? Your transformation will simply be:

<%# Eval("html") %>

I even cloned the Repeater web part and pre-configured everything so that I just have to select a path. Does that make sense?

User avatar
Member
Member
brien-anca - 11/8/2011 12:25:08 AM
   
RE:Mirror changes across multiple pages
Does this mean you need a separate template for every page that includes the common content in a different place. eg:

Page 1: "text text text [common text] text text text
Page 2: "other text other text [common text ] other text [common text]

Page 1 & 2 would need to use different templates. This would be a pain.

Dreamweaver had a feature called library item where you could push some page content into a library asset and drop it onto another page so when you update the content on one page, all pages using that asset are updated. Something like this that has an icon in the Kentico WYSIWYG editor would be ideal (like bizforms). Also, the ability to run the common content through the workflow engine is important.

User avatar
Member
Member
DesignByOnyx - 11/8/2011 8:50:40 AM
   
RE:Mirror changes across multiple pages
If you create the web part to which I referred in my previous post, you would not have to create a separate page templates.

In order for my solution to be useful, you must create a webpart (repeater) and in inline control. The inline control must accept an "alias path" as a parameter - the path to the "Shared HTML" document you wish to render. It's kind of a pain, and one of my biggest complaints about Kentico. However, the solution I have created works well. I use it a lot.

If you email me at ryan[dot]wheale[at]gmail[dot]com, I will send you the webpart and inline control I have created.

~Ryan

User avatar
Kentico Support
Kentico Support
kentico_radekm - 11/14/2011 2:03:00 AM
   
RE:Mirror changes across multiple pages
Hello Ryan.

Thank you for sharing your solution here.

Best Regards,
Radek Macalik