ASPX templates
Version 5.x > ASPX templates > Inherit Parent Content View modes: 
User avatar
Member
Member
eric.rovtar-hudsonchapel - 7/26/2010 9:31:27 AM
   
Inherit Parent Content
Is there a way to set up subpages to inherit a specific piece of content from their parent page? Basically, I'm looking to have each page inherit an image rather than manually putting the image on each page.

Thanks!

User avatar
Member
Member
eric.rovtar-hudsonchapel - 7/26/2010 12:18:13 PM
   
RE:Inherit Parent Content
Nevermind.. I figured it out! Thanks! :)

User avatar
Member
Member
eric.rovtar-hudsonchapel - 7/26/2010 8:13:39 PM
   
RE:Inherit Parent Content
Ok.. I'm going to slightly modify this question.

I figured out how to tell the control to inherit it's parent's content, so I've setup an EditableRegion to do so. Basically it contain an image that is clickable.

Now the problem is that not every child page is inheriting it. Some are, and the ones that aren't I have double checked the Template Properties. They are set to inherit based on template.

Any ideas?

-Eric

User avatar
Kentico Support
Kentico Support
kentico_radekm - 7/27/2010 2:06:02 AM
   
RE:Inherit Parent Content
Hello.

If the child page uses the same template as its parent, all content from parent´s page template is inherited to its child. Content of some web parts (EditableText, EditableImage) is bound to document, so the web part is inherited, but content not.

I would recommend you to consider Visual inheritance model (http://devnet.kentico.com/docs/devguide/visual_inheritance.htm) and do a proper documents structure.

If you did it via API, could you please show me your code, so I can see how exactly did you implemented it? Do you use the same code on multiple child pages (under the same parent), but with different result? Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
Mark - 8/5/2010 9:23:20 AM
   
RE:Inherit Parent Content
I've had the same issue. I my case it was to post a banner image at the top of the main page, but have different banners for sub pages. I opened csmdesk-site manager-development-css stylesheets, copied the stylesheet used for the main page and saved it as a new stylesheet. I then edited the new stylesheet code to point to the new header image. Lastly, I went to the individual pages and assigned the new stylesheet to them, vs inheriting, in the 'Properties' tab. The site is small, with few pages, so it wasn't a problem. For larger sites, it will be time consuming. Hope this helps.