0

I have added a layout and some renderings to a page item, in the Shared Layout. The raw value of the Renderings field shows this:

<?xml version="1.0" encoding="UTF-8"?>
<r xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <d id="{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}" l="{71FA8F43-9376-4490-96C4-63678907811E}">          
      <r ds="{14EAF6E4-3AB7-417D-A366-A45C8329ABC0}" id="{5379CD21-965C-4D8D-988B-B8DAA8D6D1C4}" par="" ph="main" uid="{34387617-A967-4B6F-A7B6-861D5815D6E5}" />
      <r ds="" id="{0CB41E0D-68B8-4096-B049-1F96ACF60847}" par="" ph="main" uid="{C708E7FA-184B-4DFC-B02B-787DF2C291F2}" />          
   </d>
</r>

The second rendering does not have any datasource. This XML is comprehensive as it has the IDs of the renderings and the datasources.

After I added the datasource to the second rendering, the raw value changed to this.

<?xml version="1.0" encoding="UTF-8"?>
<r xmlns:p="p" xmlns:s="s" p:p="1">
   <d id="{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}">
      <r uid="{59512512-E913-4C0A-9D1B-1C13CE15904B}" s:ds="{51853DB9-6A5A-40BD-BB9B-8945E18691A5}" />
   </d>
</r>

I have checked other page items which have many renderings but the raw xml value only has one entry.

  1. Why does the rendering value change.
  2. I'm expecting a field, where Sitecore will check its value for the presentation details to render the page. But from the above scenario, the details seem incomplete. How is the page still rendering correctly even with incomplete XML in the field value.
  3. What is the ID in the uid parameter. I could not find the ID in the Items database table or in the content tree.
2
  1. Rendering is quite complicated in modern Sitecore versions. (With SXA even more complicated). "Final"(please don't confuse it with Final Renderings field) rendering XML is quite complex. If simplify it, it is merged XML from standard values on template then from Renderings(shared) on the item then with Final Renderings field. I suggest you to check what is present on template.
  2. See item 1.
  3. uid is just unique identifier, it generates randomly. It doesn't correspond anything in database. I think that in your case uid is present on template configuration.
| improve this answer | |
  • Not using SXA. Just trying to understand. The template has 2 renderings. None added at page level. So why is the raw value showing only one. Any reason? – Qwerty Sep 10 at 15:46
  • Raw value displays only what is added or changed on that level. Raw value doesn't show "merged" result. Raw value could display value from the standard values template, but in this case you will see [standard value] tags near field name. (I think that it happens in your case) – Anton Sep 10 at 16:24
0

I guess there are four fields that hold presentation details, or can, potentially more with template inheritance. When an item is requested the first place Sitecore looks is the __Final Renderings field on the item to see if it has a value. Assuming it has a value the next thing is to ask if it is a full set of renderings, unlikely but possible. So lets say it has a value and it is not the full renderings. Sitecore then goes to the __Renderings field on the item with the same questions. So now we could potentially have two partial sets of instructions. The whole process is repeated on the __Standard Values. Hopefully by the time we have got to the __Renderings field on the Standard Values we have a full set of instructions, if not SC will throw a Layout not found error. Then starting with the data from the __Standard Values __Rendering field any partial sets of instructions are added in to override or simply add to the final instructions. Then it can be rendered. And people wonder why it is slow!!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.