1

I am creating a custom Layout page with snippets generated in the Snippet Gallery. When a "Page Field" snippet is generated, it looks something like this:

<div data-name="Page Field: Title">
<!--CS: Start Page Field: Title Snippet-->
<!--SPM:<%@Register Tagprefix="PageFieldTextField" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71f9dce112e9249c"%>-->
<!--MS:<PageFieldTextField:TextField FieldName="fa123e0f-1c12-4cd9-b123-0177e6ddd247" runat="server">-->
<!--PS: Start of READ-ONLY PREVIEW (do not modify)-->
<div align="left" class="ms-formfieldcontainer">
<div class="ms-formfieldlabelcontainer" nowrap="nowrap">
<span class="ms-formfieldlabel" nowrap="nowrap">Title</span>
</div>
<div class="ms-formfieldvaluecontainer">gskArticleDisplay </div>
</div>
<!--PE: End of READ-ONLY PREVIEW-->
<!--ME:</PageFieldTextField:TextField>--><!--CE: End Page Field: Title Snippet-->
</div>

Each Page Field has a unique identifier that is used by the snippet to connect to the corresponding page data. In this example for the "Title" Page Field, the value of the FieldName attribute is "fa123e0f-1c12-4cd9-b123-0177e6ddd247". By knowing the FieldName of a Page Field, it is possible to manually code snippets that are not available in the Snippet Gallery.

By hacking around, I am able to piece together a few of the FieldNames, but not all of them. So the question is, what is the proper way of determining the FieldName of a given Page Field?

  • I was able to solve my particular issue without finding an answer to the question. In the example above, "Title" can be used interchangeably as the FieldName, instead of "fa123e0f-1c12-4cd9-b123-0177e6ddd247". – Jeremicus May 27 '16 at 18:50

Your Answer

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

Browse other questions tagged or ask your own question.