I think the way to pull this off would be to loop through each country in the datatyp uComponents country picker, but the problem is that I don't know how to loop through each country in this datatype.
I think you actually want to Group the links by Country and not necessarily "sort" them, right? If so you should look into Muenchian Grouping - there are a few threads here and there on the forums about it.
The uComponents Country Picker just stores the country as a string so it should be pretty easy to group. Here's a simple example that should get you going:
Also, a side note, one caveat I ran into with the uComponents Country Picker is it doesn't seem to list all countries (for me anyway), some missing are China, Aruba, Anguilla, Fiji, etc. I posted a workitem here.
sorting links per country in xslt
Hi,
I'm currently implementing a Links page. The links shoud be listed and sorted by country.
Therefore I created a Link Item document type, and I created a linkCountry datatatype of type uComponent Country Picker.
Does anyone know how I can list the links per country?
Something like this:
Egypt
link 1
link 2
link 3
Iran
link 1
link 2
link3
etc...
I already created a for-each loop that loops through alll links, but now I need to implement the sort by country:
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1' and string(linkCategory) = 'Links by country']">
Does anyone knows how to do this with Xslt ?
Thanks for your help,
Anthony Candaele
Belgium
I think the way to pull this off would be to loop through each country in the datatyp uComponents country picker, but the problem is that I don't know how to loop through each country in this datatype.
anyone experience with this?
greetings,
Anthony
Hi Anthony,
I think you actually want to Group the links by Country and not necessarily "sort" them, right? If so you should look into Muenchian Grouping - there are a few threads here and there on the forums about it.
The uComponents Country Picker just stores the country as a string so it should be pretty easy to group. Here's a simple example that should get you going:
Also, a side note, one caveat I ran into with the uComponents Country Picker is it doesn't seem to list all countries (for me anyway), some missing are China, Aruba, Anguilla, Fiji, etc. I posted a workitem here.
Hope this helps,
Tom
Hi Tom, I added a comment to your workitem on Codeplex and I voted for your workitem
I found another missing country: Sudan
I would be nice if there was some workaround to add missing countries to the uComponent Country Picker
greetings,
Anthony
FYI, as a workaround I just imported the countries into a DB table from here and used something like Tim's Database driven dropdown list datatype
is working on a reply...