1

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.

1

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>

Your Answer

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

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