ASPX templates
Version 6.x > ASPX templates > InheritContent Not working View modes: 
User avatar
Member
Member
lwhittemore-emh - 1/18/2012 9:17:36 AM
   
InheritContent Not working
I have used inheritcontent before in 5.5 and it worked for the most part. We had some issues with firefox adding <br /> tags that would prevent it from working, but now in 6 it doesn't seem to work at all. We no longer get the <br /> tags so I know that is not the issue.

Any thoughts?

User avatar
Member
Member
lwhittemore-emh - 1/18/2012 9:21:14 AM
   
RE:InheritContent Not working
<h1><cms:CMSEditableRegion runat="server" ID="RightSideTitleContent" RegionTitle="Right Title" RegionType="textbox" InheritContent="true"    /></h1>
<cms:CMSEditableRegion runat="server" ID="RightSideContent" RegionTitle="Right Content" RegionType="HtmlEditor" InheritContent="true" />


that is what our code looks like. The parent and child documents all use the same template.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 1/19/2012 1:07:43 AM
   
RE:InheritContent Not working
Hello.

Could you please try to apply the latest hotfix, please? I believe this issue has been already fixed (in hotfix 6.0.8). However, hotfixes are cumulative, so you can apply the latest one. Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
lwhittemore-emh - 1/19/2012 8:23:59 AM
   
RE:InheritContent Not working
We use the kentico installation manager and it shows that we have version 6 and hotfix 13.

However through the cmsdesk it says we are on version v6.0.4395. Is there a way through the cmsdesk or site manager to see what hot fixes have been applied?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 1/23/2012 5:43:00 AM
   
RE:InheritContent Not working
Hello.

Yes, that is correct, build number 6.0.4395 is for hotfix 13. Anyway, when I read your issue again I realized something. You wrote:


The parent and child documents all use the same template.


This property (InheritContent) takes effect when you inherit from that template, not when you create a new page based on that page template. Content of this EditableText web part is bound to document itself, not page template, so every page based on this page template can have a different content within.

Best Regards,
Radek Macalik

User avatar
Member
Member
lwhittemore-emh - 1/23/2012 7:50:49 AM
   
RE:InheritContent Not working
I'm a little lost on what you are saying. I have done what I am trying to do before in 5.5 and it worked this way.

I have a template that has an editable region and inheritContent is set to 'true'. In 5.5 I was able to set the template on a parent document and then any child documents that had the same template would inherit content from the parent if the editable region was left blank on the child.

I have this set up in 6 the same way using ASPX pages but it does not seem to work. I have a menu on the right hand side in the editable region of the template with inherit set to true and then on the child pages that section is left blank.

What I have been led to believe is that if you have an editable region with inherticontent set to true any child documents using the same template will inheritcontent if the regions are left blank.

Sorry if I am being confusing

User avatar
Member
Member
rahat.veraida-gmail - 1/25/2012 6:10:51 AM
   
RE:InheritContent Not working
I agree with lwhittemore-emh.
I also thought it would work the way he described and then got the following reply from the Kentico team:

The Editable text web part is unique for each page so it cannot be inherited by default. You can use the Static HTML web part if you want to inherit the content.

User avatar
Kentico Support
Kentico Support
kentico_radekm - 2/9/2012 2:28:45 AM
   
RE:InheritContent Not working
Hello.

It may depends on development model - Portal engine or ASPX templates. The thing is that this property cannot be used for ASPX templates. The ASPX model doesn't have inheritance possibilities. The problem is that this property is available without any information (comment, exception or something like that, that it cannot be used) so it may lead to some confusion then. To be honest with you I though it should work on ASPX templates too, however I was ensured by our developer that it does not.

If it worked in previous version, maybe there were some special circumstances or so, however it was not and it is not designed or expected functionality.

Luckily, there is a workaround for ASPX templates as well. Please find it here.

Best Regards,
Radek Macalik

User avatar
Certified Developer 9
Certified Developer 9
james.li-avivasolutions - 3/15/2012 9:35:47 AM
   
RE:InheritContent Not working
Hi,

I also came accross this problem. Why has the inheritance feature been removed? It is the cause when using the CmsPortalManager (instead of CmsPageManager which is marked as obsolete in the documentation).


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/15/2012 9:50:46 AM
   
RE:InheritContent Not working
Hi,

The inheritance worked in the past by mistake - it was a false behavior which worked in most cases but it was not ensured to be 100% correct.

Best regards,
Juraj Ondrus