Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to create a view of stuff from my reusable content list. Basically I am storing global links within the reusable content list.

I'm struggling with the content query webpart, because it always shows me the LINK to the item in the reusable content list - what I want it to show is the ReusableHTML Column of the specific item in the list.

I tried doing so with

<property name="DataColumnRenames" type="string">ReusableHtml,Reuse</property> <property name="CommonViewFields" type="string">ReusableHtml,Text</property>

But somehow the CQWP doesn't display anything when using these two properties.

My reusable content list basically looks like so:

Title     ReusableHTML
Static 1  <a href="#">Link 1</a>
Static 2  <a href="#">Link 2</a>

And basically I want to display these global links via the masterpage of my site - easily editable for the end user in the reusable content list.

Anyone up for a .webpart file or could show me another tutorial, because the MS tutorial here did not help me.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Try this:

<PublishingWebControls:ContentByQueryWebPart
  runat="server"
  WebUrl="~sitecollection/"
  ListName="Reusable Content"
  ServerTemplate="100"
  DataMappings="Reuse:ReusableHtml,ReusableHtml,HTML;"
  DataMappingViewFields="Title,Text;ReusableHtml,HTML;"   
  ... >
</PublishingWebControls:ContentByQueryWebPart>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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