You will notice am displaying the parent name thought instead of the Child. Unfortunately the sorting is still not working. I also tried but without any success
Sorry the sorting is working but what i would like is sorting all child nodes depending on the Count regardless of the parent. Right now the sorting is working as such
- FOLDER -- Vids AB --Vids 3(count 10) --Vids 4(count 16) -- Vids BC -- Vids 2 (count 3) -- Vids 6(count 5) -- Vids BC -- Vids 1(count 12)
Any suggestions on this please?? Getting the impression that this is not possible because of each Parent Node. Am i right on this or is there a way od achiving the sorting?
Sort 2 Values
Hi guys, i have the following tree Node and i would like to make a sorting depending on the docType and the number of count view.
So the tree node looks like this
- FOLDER
-- Vids AB
--Vids 3(count 10)
--Vids 4(count 6)
-- Vids BC
-- Vids 2 (count 3)
-- Vids BC
-- Vids 1(count 12)
Only the child nodes will be displayed here thought. I did try this but its not reflecting the right descending output which shoulb be
Vids 1 (count 12)
Vids 3 (count 10)
Vids 4 (count 6)
Vids 2 (count 3)
Both not working,
Any suggestion??
Hi Fuji,
Are you not only sorting by count? (It looks like that to me but it may of course be because you've simplified the problem here).
Anyways, how is the count stored? Is it a property on the documents or do you have to call that extension to get it?
If you need to call the extension, this should work:
Could you post the XML you get from a call to ViewCount:GetViews(@id) ?
/Chriztian
Hi Chriztian,
Yes its a property in the document, and using the Refactored Content Views package to get the number of views a node has been viewed.
Here i need to sort all child nodes displaying the most viewed one. Here is how my code looks like
You will notice am displaying the parent name thought instead of the Child. Unfortunately the sorting is still not working. I also tried but without any success
<xsl:sort select="ViewCount:GetViews(number(@id))//@count" order="descending" data-type="number" />
Chriztian,
Sorry the sorting is working but what i would like is sorting all child nodes depending on the Count regardless of the parent. Right now the sorting is working as such
- FOLDER
-- Vids AB
--Vids 3(count 10)
--Vids 4(count 16)
-- Vids BC
-- Vids 2 (count 3)
-- Vids 6(count 5)
-- Vids BC
-- Vids 1(count 12)
Output right now when using is
Expected output
Any suggestions on this please?? Getting the impression that this is not possible because of each Parent Node. Am i right on this or is there a way od achiving the sorting?
Hi Fuji,
I'm certain it's possible - but I guess I still just don't really understand the problem...
Please try this, and post the results so I can get an idea about what's happening (change the stuff I've highlighted in bold):
/Chriztian
Hi Chriztian,
Thanks for the help. I guess you changed the way i see xslt again!! My error was in my loop, changing it so check all DocType made it easier.
My previous code
Working one
Thanks for the help
//Fuji
is working on a reply...