Is there a way in Sharepoint 2007 Publishing, to retrieve a custom content type's column value for the displayed article. I want to show different colored ribbon images according to article type which is stored in a custom column.
Thank you.
|
Is there a way in Sharepoint 2007 Publishing, to retrieve a custom content type's column value for the displayed article. I want to show different colored ribbon images according to article type which is stored in a custom column. Thank you. |
|||
|
|
|
For a publishing page to get the column value I use the following This code i have written in a UserControl Placed in a Page Layout , and in the UserControl i wrote the following code
|
||||
|
|
|
If you place a FieldValue control on a Page Layout you can set this to display the value of a custom column using the FieldName property. For example:
Note you will need a reference to Microsoft.SharePoint.WebControls at the top of the page before this will work e.g.
If you need to perform some manipulation on this value then you can get the value in code by using |
|||
|
|
|
I used the folowing method to get the data from all publishing pages that have value in the "Page Content" field
hope it helps. |
|||
|
|