Visual inheritance

http://devnet.kentico.com/docs/7_0/devguide/index.html?visual_inheritance.htm

The content of sub-pages is displayed using Page placeholder web parts.

The result of this approach is that the sub-page content is "nested" inside the content of higher‑level pages.

The following picture shows the root (master page) without nested content:

... and here's the home page nested inside the master page:

Please note how the pages are structured in the content tree: the root (master page) is the parent of the Home page which is loaded inside the master page.

You can perform nesting recursively at any level of the content tree.

A necessary component for page nesting is the Page placeholder web part.

This web part must be placed on the master page and it specifies the place where the underlying page will be inserted.

The Page placeholder on the Corporate Site root loads the sub-pages between the main menu and footer:

Configuring visual inheritance

In some cases, you may want to hide some parts of the parent page. There are several ways how to achieve that:

Using the "Inherit content" property of the page template

Select the /News page, go to its Properties -> Template tab and click the Edit template properties action.

Now you can set the Inherit content value to Select inherited levels and check only the Level 1 box.

This means that only the content from the first level of the content hierarchy will be displayed and the root master page (Level 0) is not inherited.

Click  Save to confirm the changes.

The page will look like this:

Set the value back to inheritance from Level0 only and click  Save.

Similarly, you can set the content inheritance on the level of individual pages using the Properties -> Template dialog.

The content inheritance settings you configure for documents override the settings of the assigned page template.

Configuring content inheritance

http://devnet.kentico.com/docs/7_0/devguide/index.html?wireframing_content_inheritance.htm

Like regular pages, wireframes provide support for master pages and visual inheritance.

This allows them to display content from parent documents in addition to their own specific components.

Content inheritance offers several advantages, such as viewing wireframes within the exact context of the website and being able to manage shared wireframe content in a single location.

To configure the inheritance preferences for dedicated Wireframe documents:

1. Select the wireframe document in the content tree in CMS Desk.

2. Open the Form tab.

3. Select one of the options in the Inherit content section.

Use page template settings

The content inheritance is determined by the settings of the wireframe's template.

To manage the template's configuration:

1. Switch to the Wireframe tab.

2. Right-click the green template header at the top of the wireframe grid and select Edit template.

3. Set the Inherit content property on the General tab of the Page template properties dialog.

Wireframe inheritance options

Wireframe inheritance for combined documents

For combined documents that have both standard content and a wireframe definition, you can find the inheritance settings on the Properties -> Wireframe tab instead.

The wireframe inheritance is completely separate from the content inheritance configured for the actual page (on the Properties -> Template tab).

They do not affect each other in any way and you can set them up differently.

kentico 10

https://docs.kentico.com/k10/developing-websites/developing-websites-using-the-portal-engine/inheriting-portal-engine-page-content

Inheritance allows you to maintain a consistent design throughout the website and manage content shared by multiple pages in a single location.

Portal engine pages can use two different types of content inheritance:

  • Page nesting inside ancestor pages
  • Inheriting the entire page template from the parent page (shared templates)

Using page nesting

Nested pages display their own content inside other pages. You can nest pages within ancestor pages in the content tree.

What are ancestor pages?

Ancestors include all pages under which a given page is stored, from the root of the site's content tree down to the page's direct parent.

For example, the /Company/Offices/London Office page has the following ancestors:

  • Website root page
  • /Company
  • /Company/Offices

Nesting allows you to organize your website's content tree in the following way:

  • Pages that provide shared content on the upper levels
  • Individual content pages stored as subpages
 
 
 
 
 
 
 

Inheriting portal engine page content

Inheritance allows you to maintain a consistent design throughout the website and manage content shared by multiple pages in a single location. Portal engine pages can use two different types of content inheritance:

  • Page nesting inside ancestor pages
  • Inheriting the entire page template from the parent page (shared templates)

Using page nesting

Nested pages display their own content inside other pages. You can nest pages within ancestor pages in the content tree.

 

What are ancestor pages?

Ancestors include all pages under which a given page is stored, from the root of the site's content tree down to the page's direct parent.

For example, the /Company/Offices/London Office page has the following ancestors:

  • Website root page
  • /Company
  • /Company/Offices

Nesting allows you to organize your website's content tree in the following way:

  • Pages that provide shared content on the upper levels
  • Individual content pages stored as subpages

Creating pages that support nesting

Note: The following steps are required for all pages serving as master pages, but you can also set up nesting for any other pages.

To allow subpages to nest within a page:

  1. Open the Pages application.
  2. Select the page in the content tree.
  3. Open the Design tab.
  4. Add the Page placeholder web part.

The page placeholder specifies the position of nested pages within the content.

When displaying the nested pages, the system loads everything around the page placeholder as fixed content.

Setting default content for page placeholders

By default, the placeholder does not display anything on the page where it is placed. You can configure the placeholder to show one of the website's re-usable page templates as default content:

  1. Configure the page placeholder web part (double-click).
  2. Select a template in the Default page template property.
  3. Click OK.

The page displays the selected template inside the area occupied by the page placeholder. Nested pages ignore the placeholder's default template and display their own content instead.

The Use template on all subpages and Page to display properties force the placeholder to always display the default template or a specific page.

Such placeholders cannot be used for standard page nesting — all nested subpages display the specified content instead of their own.

Configuring pages to nest within ancestors

Tip: You can use page nesting on any number of levels. Nested pages can also contain their own page placeholders for displaying subpages.

  • Open the Pages application.
  • Select the subpage page in the content tree.
  • Open the Properties -> Template tab.
  • Choose one of the following Page nesting options for the page:

Use page template settings

The page nesting settings are determined by the configuration of the page's template. This option allows you to manage the settings for pages with shared templates.

To modify the page template's nesting settings:

  1. Click Edit template properties.
  2. Set the Page nesting options on the General tab.
  3. Click Save.

None

The page behaves as a standalone page without any nesting.

Only the nearest master page

The page nests only within the website's master page.

If your website uses multiple master pages, the page nests within the closest master page in the content tree hierarchy.

Specific ancestor pages

Allows you to enable or disable nesting within any ancestor pages (regardless of the master page structure). Specific pages are represented by the checkboxes below.

Inheriting the page template of the parent page

One way to display content from parent pages is to inherit the entire page template.

Pages with an inherited template are mostly identical to the parent, but you can modify them in the following ways:

  • Set different content inside the page's editable web parts (Editable text and Editable image)
  • Use web parts that display different content based on the page's type and location in the content tree (path)
  • Hide web parts on subpages
  • Add web parts that appear only on particular page types

A typical scenario where you can use page template inheritance is a parent page of the Page (menu item) type with multiple child pages that aren't set to behave as Page (menu item) types.

By inheriting the template, users can create the child pages without worrying about the page design.

You can use one of the page viewer web parts to dynamically display a list of these child pages on the parent page.

Each child page then displays specific detailed information when viewed.

You can create new pages with an inherited template by choosing the Use parent page template option in the template selection dialog.

Page types that aren't set to behave as Page (menu item) types automatically inherit the template of the parent page by default.

To configure an existing page to inherit the parent page's template:

  1. In the Pages application, select the page in the content tree.
  2. Open the Properties -> Template tab.
  3. Select Inherit from parent in the Template section.
  4. Click Save.

The child page uses the same page template as the parent.

Any changes that you make to the page template's layout or web part configuration affect both the parent page and all pages that inherit the template.

Tip: The page template inheritance can continue throughout the content tree — pages may inherit from parent pages that already use an inherited template (Parent -> Child -> Descendants...).

Sample inheritance scenario

The following example shows how the system processes a request for a nested product page: /Products/Notebooks/Dell-XPS-15z

This sample scenario demonstrates content inheritance through both page nesting (Page placeholder web parts) and page template sharing.

The portal engine loads the templates in the following order:

1. / (root)

Website master template

2. /Products

Products page template

3. /Products/Notebooks

Laptops page template

4. /Products/Notebooks/Dell-XPS-15z

Laptops page template - inherits the page template from the parent page.

inheritance in kentico的更多相关文章

  1. 代码的坏味道(12)——平行继承体系(Parallel Inheritance Hierarchies)

    坏味道--平行继承体系(Parallel Inheritance Hierarchies) 平行继承体系(Parallel Inheritance Hierarchies) 其实是 霰弹式修改(Sho ...

  2. 5.Inheritance Strategy(继承策略)【EFcode-first系列】

    我们已经在code-first 约定一文中,已经知道了Code-First为每一个具体的类,创建数据表. 但是你可以自己利用继承设计领域类,面向对象的技术包含“has a”和“is a”的关系即,有什 ...

  3. single-table inheritance 单表继承

    type 字段在 Rails 中默认使用来做 STI(single-table inheritance),当 type 作为普通字段来使用时,可以把SIT的列设置成别的列名(比如不存在的某个列). 文 ...

  4. C++: virtual inheritance and Cross Delegation

    Link1: Give an example Note: I think the Storable::Write method should also be pure virtual. http:// ...

  5. React之Composition Vs inheritance 组合Vs继承

    React的组合   composition: props有个特殊属性,children,组件可以通过props.children拿到所有包含在内的子元素, 当组件内有子元素时,组件属性上的child ...

  6. JavaScript Patterns 6.4 Prototypal Inheritance

    No classes involved; Objects inherit from other objects. Use an empty temporary constructor function ...

  7. JavaScript Patterns 6.2 Expected Outcome When Using Classical Inheritance

    // the parent constructor function Parent(name) { this.name = name || 'Adam'; } // adding functional ...

  8. JavaScript Patterns 6.1 Classical Versus Modern Inheritance Patterns

    In Java you could do something like: Person adam = new Person(); In JavaScript you would do: var ada ...

  9. Jade之Template Inheritance

    Template inheritance jade支持通过关键字block和extends来实现模板继承. 比如,在layout.jade写上如下代码 html head title My Site ...

随机推荐

  1. [BZOJ 3365] Distance Statistics

    [题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=3365 [算法] 点分治 [代码] #include <algorithm> ...

  2. 杂项-Java:Shiro(Java安全架构)

    ylbtech-杂项-Java:Shiro(Java安全架构) Apache Shiro是一个强大且易用的Java安全框架,执行身份验证.授权.密码和会话管理.使用Shiro的易于理解的API,您可以 ...

  3. 使用VMware搭建3台一模一样的Linux虚拟机

    转自:https://www.linuxidc.com/Linux/2014-08/105909.htm 简介:VMware可以在个人本地一台笔记本机器上同时运行二个或更多Windows.DOS.LI ...

  4. 15.Linux的文件结构

    linux的文件结构和windows不同,没有分区,是树形的结构: /etc:存放配置文件 /lib:编译程序需要的函数库 /usr:包含所有其他内容,比如内核在/usr/src中,/usr/bin存 ...

  5. 绘图中的drawRect

    rect参数:代表的是当前view的bounds 1 为什么要在drawRect方法里面写绘图代码 因为只有在这个方法中才能获取到当前view相关的图形上下文对象 有了这个图形上写文对象后才能进行绘图 ...

  6. signature验证/salt验证/token验证的作用

    1.salt验证: salt是随机生成的一串字符,salt验证的作用是将生成的salt与加密的密码密文拼接后再次加密存储  这样可以是存储在数据库中的密码更加安全 2.signature验证: I.将 ...

  7. 编程范式(Programming Paradigm)-[ 程序员的编程世界观 ]

    编程范式(Programming Paradigm)是某种编程语言典型的编程风格或者说是编程方式.随着编程方法学和软件工程研究的深入,特别是OO思想的普及,范式(Paradigm)以及编程范式等术语渐 ...

  8. TF基础3

    批标准化 批标准化(batch normalization,BN)是为了克服神经网络层数加深导致难以训练而诞生的.深度神经网络随着深度加深,收敛会越来越慢,会导致梯度弥散问题(vanishing gr ...

  9. IDEA里面的facets和artifacts的讲解

    Facets: Facets表述了在Module中使用的各种各样的框架.技术和语言.这些Facets让Intellij IDEA知道怎么对待module内容,并保证与相应的框架和语言保持一致. 使用F ...

  10. linux C++ 编译错误 file not found 其实是原文件后缀的问题

    gcc和clang会根据源文件的后缀.c或者.cpp判断原文件类型,采取不同的编译策略,所以我使用它们编译后缀是.c的C++原文件的时候会出现找不到include的文件的错误,使用正确的后缀名即可.同 ...