Placeholder Prediction for Dynamic Placeholder

I am using Fortis Dynamic Placeholders , but you need to set up a page template where dynamic placeholders contain rendering. I set the page template up, setting the layout details for the default page template values.

I was not able to do this because a dynamic placeholder was added by the generated GUID. Is there any way to predict this GUID? According to the documentation, a GUID is generated using the following logic:

Dynamic placeholders simply use a rendering identifier to create a unique placeholder name. If more than one dynamic placeholder with the same name is added in the rendering, it will also add the extension number

I tried a different approach using the home dynamic replacement library, which just added a dynamic placeholder with a sequential number, for example. row1, row2, row3. But this approach makes content editors incapable of moving lines in the experience editor, because the content inside the line is tied to a fixed number that changes as the lines move.

+4
source share
1 answer

Since this question was answered at sitecore.stackexchange.com, I want to provide an answer here as well. Great credit to Richard Seals and by Thomas D .

: .

: , ..

Fortis UID , -, . , Raw Values ​​ xml .

, . xml, :

<r id="{CA76EB6F-2934-4B8A-BB6A-508A8E44A7C5}" 
   ph="body" 
   uid="{0FD41EBD-43CF-4647-8A0F-F1F1D2E00CCD}" />

. 2: id, uid, , -.

: string.Format( "{0} _ {1}", placeholderName, renderingId);

, -, , xml : title_ {0FD41EBD-43CF-4647-8A0F-F1F1D2E00CCD}

+1

Source: https://habr.com/ru/post/1654543/


All Articles