Template type (initial/jcr:content/sling:resourceType points to different page component than structure/jcr:content/resourceType) .. what are the implications ??

Avatar

Avatar

Adilmo

Avatar

Adilmo

Adilmo

10-03-2021

In we-retail xf template-type 

 

initial/jcr:content/sling:resourceType points to xfpage while 

structure/jcr:content/resourceType points to core component page ?? 

 

Which page component shall be used for xf template ? core OR xf page ?? 

 

In general what are the implications of such setup ?? why do we need this ?? 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

11-03-2021

Hi @Adilmo,

Defining sling:resourceType in initial and structure refers to the page rendering component for the respective template. 

For XF, page rendering component is the one that inherits from OOB resource - cq/experience-fragments/components/xfpage

Defining the same as part of initial and structure of XF's template-type and template, brings in Variation, Building blocks when we create XF pages using those templates (specific to XF page editor)

In general,

  • For static template creation, we use to locate the page rendering component. 
  • Same way for editable templates, initial and structure (two modes of template editor) is the place to define the page rendering component.

Let know if you are looking for any other details.

Adilmo
Can initial and structure mode of template/template-type point to different page rendering components... ? What does that mean???
Vijayalakshmi_S

Hi,

It can point to different page rendering components as evident from we-retail. (Templates/template-types of XF pages has initial to be XF and Structure to be core page)
This is to be viewed in two different standpoint - Both from template editor and from pages (created using that template) as they both are resources of type cq:Page

From a template editor,

  • In Initial content view -> page rendering component as defined in its jcr:content is used to render the same.
  • In Structure mode -> page rendering component as defined in its jcr:content is used.

From page(created using that template),

  • Page rendering as defined in the initial mode defines the mark up of the page. (In other words, if there is no resourceType in initial, we can't create page at first place)
  • Then the content authored as part of Structure mode is merged with initial and is rendered in the resulting page. (components available in structure/jcr:content/root)

To be more precise to your query in the original post,
From XF editor standpoint, it is two different rendering. But the XF page (as available in /content/experience-fragments) is of resourceType as defined in initial. (You can cross check the resourceType of any of the XF page master variation)

Answers (0)