4

I have something like the following in my Taxonomy Term Store:

+ [Managed Metadata Service]
  + Earth (Group)
    + Continents (Term Set)
      + Europe (Term)
        - Italy (Term)
        - France (Term)
      + Asia (Term)
        - China (Term)
        - India (Term)

I have a managed metadata column in my page layout that accepts multiple values.

I have the following pages that uses this page layout and its metadata value/s:

  • Ceramics (China)
  • Tiger (China, India)
  • Hinduism (India)
  • Gondola (Italy)
  • Macaron (France)

On a different page (groupings.aspx), I have a content query web part.
What I'd like is to have it display 'Asia' values like:

[+] China
      Ceramics (link to the Ceramics page)
      Tiger    (link to the Tiger page)
[+] India
      Hinduism (link to the Hinduism page)
      Tiger    (link to the Tiger page)

I need help selecting the filters and developing the xsl for the content query. The expand/collapse on China and India would be great but not necessary. I can do that one my own. I just don't have a lot of experience with xsl transformation.

kei
  • 20,157
  • 2
  • 35
  • 62
  • 1
    You might get helpful responses from the non-SharePoint XSLT crowd if you post the XML starting point and target. – kjhughes Oct 08 '13 at 03:12
  • I don't know how to get those tbh – kei Oct 08 '13 at 15:50
  • Content query webpart is extremely hard to implement due to the xsl transforms. Why dont you try a visual webpart using Sharepoint Object Model to get the data? – Luis Oct 12 '13 at 15:48
  • 1
    The fact that the column allows multiple values ​​- complicates matters greatly. It's really not easy to do this in XSL. How about creating a WP inherits CQWP, where you can modify the results, and create a separate result for each item that contains multiple values ​​in this column? – banana Oct 15 '13 at 07:08
  • We had done something similar, we had use jquery SPServices to fetch all the pages, within the library, and then process and segregate them based on tags. Con with this is if you have lot many pages in lib than it will be slow. – Nikunj Oct 09 '14 at 17:20

1 Answers1

0

the best thing i can offer you is to use

<xmp><xsl:copy-of select="*" /></xmp>

that way you can just see all your xml response and query it right.

Taxonomy fields comes like "value#guid", so you need to use a replace implementation.

last this i strongly recommend moving to search, Search Content WP can do anything that CQWP can do and much more, the filtering is much more easy and dynamic, you work with html/js templates instead of xsl.

if you fear for "online/real time" results then use continues crawl, it can be set to 1 minute for a farm with up to 3.7 million items and you have online results.

bresleveloper
  • 5,940
  • 3
  • 33
  • 47