Not a member yet?

Not a member yet? Register now!

*
*
*

*
Already a member?
ASPX templates
Version 3.x > ASPX templates > Templates not inheriting "Header" View modes: 
User avatar
Member
Member
Mufasa - 10/15/2008 6:07:48 PM
     
Templates not inheriting "Header"
Using Kentico 3.1a, we have a template that has data in the "Header" tab. (A script tag that the template and all sub-pages that use the template need.)

The pages beneath the page with the template are using the page template via inheritance. However, the script tag in the "Header" is not being included on the sub pages, only the main page that has the header explicitly set.

Since the template is inherited, I can't go to Properties -> Templates -> Edit template to set the "Header" for each page either (since inherited templates can not be edited from there).

Bug? Does a workaround exist?

Mufasa

User avatar
Kentico
Kentico
kentico_helenag - 10/16/2008 6:49:55 AM
     
RE:Templates not inheriting "Header"
Hello Mufasa,

I tested this issue on my machine (3.1a version, ASPX templates).

I added a line to “Header” tab and tested the children pages. All children have included the content I added to the parent’s head tab – even they inherit the template or simply use the same template.

You may not edit the inherited template, it is the rule. If you would like to have this possibility, you could choose the same template in: Properties -> Template -> Select… (not inherit) - then you could edit the template and its “Head” tab.

Please note that if you change the “Head” tab content it appears on all pages with the same template (they do not need to be children).

If the children do not inherit the head, could you please check if the ASPX template has the correct specification ‘Inherits’ in the code? It should 'Inherits' from itself. For example: If you have an ASPX template ~/CMSTemplates/CorporateSiteASPX/Services.aspx the first line of its code should be:
<%@ Page Language="C#" MasterPageFile="Root.master" AutoEventWireup="true" CodeFile="Services.aspx.cs" Inherits="CMSTemplates_CorporateSiteASPX_Services" ValidateRequest="false" %>

Best regards,
Helena Grulichova

User avatar
Member
Member
Mufasa - 10/16/2008 9:21:50 AM
     
RE:Templates not inheriting "Header"
We're using portal templates, not ASPX templates. Will that make a difference?

Mufasa

User avatar
Kentico
Kentico
kentico_helenag - 10/16/2008 10:06:53 AM
     
RE:Templates not inheriting "Header"
Hello,

I am sorry but you are writing to ASPX templates forum not to Portal engine one.

The tests pass also in Portal engine, only the hint in the end of my post could not to be used.

Could you please try to test the both scenarios:
1. inherited template
2. chosen same template
and check the source code of live pages?

Also please try to clear the browser cache and also cache of CMS and restart the application in CMSSiteManager -> Administration -> System -> General?

Unless there are still not appearing any changes of head sections, could you please send us an export of your site to support@kentico.com? You can export the site by going to Site Manager -> Sites and clicking the Export button next to the given web site in the list.

Thank you.

Best regards,
Helena Grulichova

User avatar
Member
Member
Mufasa - 10/16/2008 5:14:45 PM
     
RE:Templates not inheriting "Header"
Oops. I knew better than to put it in this forum and to have put it in the Portal one. I guess I wasn't paying attention. :(

Browser cache cleared and server restarted--same thing. Yes, source code was checked that the extra script tag in the Template's Header box was not being output to the rendered HTML.

If I set the Template explicitly on the sub pages (so they are not inherited), then it works fine. But, I would prefer them to be inherited, so I don't have to teach the customer how to select a template.

User avatar
Kentico
Kentico
kentico_helenag - 10/17/2008 8:57:18 AM
     
RE:Templates not inheriting "Header"
Hello,

1. Could you please check the Alias path of documents with which you have problems of displaying in the repeater? It could be found in the page Properties.

2. Could you please tell me if you use workflows in pages which should be parents of inheriting?

3. Could you please tell me a version of Kentico which you use?

Thank you.

Best regards,
Helena Grulichova

User avatar
Member
Member
Mufasa - 10/17/2008 10:44:58 AM
     
RE:Templates not inheriting "Header"
1. What may the error be with the "Document alias"? I know where it is and all, but what do you think could be wrong with it that may be throwing it off?
2. We are not using workflows at this point. (Site still at the alpha stage, so workflows just slow the development process down. We'll switch to using workflows once we switch to beta and let the client start using it.)
3. Kentico v3.1a

User avatar
Kentico
Kentico
kentico_helenag - 10/17/2008 12:23:07 PM
     
RE:Templates not inheriting "Header"
Hello,

I meant to check if the news items which should not occur in the DataList (I am sorry for confusing) have the Alias path: /Mainpage/name not /Mainpage/Subpage1/name.

/Mainpage/Subpage1 path should display only the active item – I am a little confused why it should display the other sub pages under /Mainpage.

Regards the issue with header inheriting:
I am sorry but I am not able to reproduce you issue. It works correctly in my tests. I would need to test it in your background. Could you please send me an export or – if it would be possible - allow access to your live site?

Best regards,
Helena Grulichova
support@kentico.com

User avatar
Member
Member
Mufasa - 10/16/2008 9:50:02 AM
     
RE:Templates not inheriting "Header"
Not sure if this is also an affect of whatever issue I have with the template/header thing, but I am having trouble on these pages with the Path setting too.

If I set it to /Mainpage/% a Repeater shows the correct items on /Mainpage. But when showing /Mainpage/Subpage1, the Repeater only shows the active item, and not the other sub pages under /Mainpage. And I have a DataList that I have the path set to /Mainpage/Subpage1/% (that shows all the News items under Subpage1) but it seems to be showing all news items that are under /Mainpage. What's up with this? I'm all confused since normally the Path values work fine for me. Just not on this page.

Do you have some suggestions on where to start debugging this because I have run out of things to try.

User avatar
Member
Member
Mufasa - 10/21/2008 10:35:14 AM
     
RE:Templates not inheriting "Header"
FYI, support helped me discover using the NestedDatalist property on the outer Repeater instead of setting the Path on the nested Datalist control. That fixed this issue.

User avatar
Member
Member
Mufasa - 10/21/2008 10:37:29 AM
     
RE:Templates not inheriting "Header"
FYI, Kentico support confirmed that the header property is not applied when the inheriting pages are of a different document type and that this is a bug. They tell me it will be fixed, presumably in Kentico 3.2?

User avatar
Member
Member
rnoda@zytechsoft.com - 10/5/2011 9:12:36 AM
     
RE:Templates not inheriting "Header"
I would like to know the status of this. We are using version 5.5 and still are having the same issue, the header code is not applied to the child pages when inheriting the template from the parent page. The child pages are of a different type, they are event items, while the parent is a page item.

User avatar
Member
Member
rnoda@zytechsoft.com - 10/5/2011 9:17:33 AM
     
RE:Templates not inheriting "Header"
Just following up on my previous post, all we needed to do was to make the Event document type behave like a page.

User avatar
Kentico
Kentico
kentico_helenag - 10/11/2011 7:36:37 AM
     
RE:Templates not inheriting "Header"
Hello,


Yes, it is by design behavior that only document types which are marked as "Behave as Page (menu item) type" inherit the header of templates.


Best regards,
Helena Grulichova

1