locked
Publishing Page Web Controls RRS feed

  • Question

  • I am working on developing a custom publishing page layout. In this page layout I have several publishingwebcontrols fields. I am trying to get the value of these fields, however, I can only seem to get back the field titles ... any ideas???
    • Moved by Kris Wagner - MVP Monday, August 15, 2011 2:00 AM Design/Publishing moving to correct forum (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Sunday, August 14, 2011 8:13 PM

Answers

  • I was actually finally able to get this to work. I guess I had a case of the dumbs :)

    The problem was I wasn't thinking of the publishing page as a list item. Basically if you look in the "Pages" document library and find the page you want (note this will be a list item), then you can access all the fields in the page as page["fieldName"] ...

    • Marked as answer by DavidH1986 Tuesday, August 16, 2011 3:34 PM
    Tuesday, August 16, 2011 3:34 PM

All replies

  • use fieldvalue control in PageLayout to get the field value

    <%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
    

     <SharePointWebControls:FieldValue id="uniqueid" FieldName="FieldName" runat="server"/>


    Rahul Sharma
    http://sharepointarrow.blogspot.com/
    Sunday, August 14, 2011 8:33 PM
  • I was actually finally able to get this to work. I guess I had a case of the dumbs :)

    The problem was I wasn't thinking of the publishing page as a list item. Basically if you look in the "Pages" document library and find the page you want (note this will be a list item), then you can access all the fields in the page as page["fieldName"] ...

    • Marked as answer by DavidH1986 Tuesday, August 16, 2011 3:34 PM
    Tuesday, August 16, 2011 3:34 PM