I don't see why you should downvote Martin's post. Agree that the question is far from complete. Reminds me again how much I detest the voting down option.
Anyway, Martin, I presume you'd like to have - based on the stats build by umbracostats - to list a top ten list of most visited pages? Can't really help you on this one, as I'm not experienced in umbracoStats, Have you tried fiddling with the database? Can you find some sort of table that would hold the info you're looking for. Do you need help generating a top ten from that info? Do you have problems integrating the top ten list from sql using xslt? Let us know what you're looking for and - as others pointed out already - what have you tried already.
I didn't like the post for obvious reasons and provided critisism so the author could do something about it. Why would I need to post a reply for that? If that isn't what the downvoting is for then I don't know why else we would need it at all. Especially if it immediatly leads to a discussion on the vote instead of the post itself.
I do agree that downvoting might not be the best welcome for some. If I had known that this was his first post perhaps I would've reacted differently. On the other hand, though, I do think we can expect most developers to have some experience on forums these days. I'm pretty sure that simply asking for stuff is frowned upon pretty much everywhere.
// Loop through results and display as an orderedList IDictionaryEnumerator ide = results.GetEnumerator(); System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<ol>"); while (ide.MoveNext()) { umbracoStat.Businesslogic.StatItem statItem = (umbracoStat.Businesslogic.StatItem) ide.Value;
Top 10 list with 10 most clicked pages
Hi anyone who can help with an xlst list with top 10 most clicked pages on website?
Using Umbraco 3 with umbracostats
Br
Martin
Hi Martin,
As SaphuA has pointed out in his little down thumb... it would be good to know what you have tried so we can help you :)
If you've never used XSLT before, then it's worth googling a bit for a few examples.
Cheers,
Chris
I don't see why you should downvote Martin's post. Agree that the question is far from complete. Reminds me again how much I detest the voting down option.
Anyway, Martin, I presume you'd like to have - based on the stats build by umbracostats - to list a top ten list of most visited pages? Can't really help you on this one, as I'm not experienced in umbracoStats, Have you tried fiddling with the database? Can you find some sort of table that would hold the info you're looking for. Do you need help generating a top ten from that info? Do you have problems integrating the top ten list from sql using xslt? Let us know what you're looking for and - as others pointed out already - what have you tried already.
Looking forward to your info.
Cheers,
/Dirk
P.s. I agree about the down thumbs.. not a very nice welcome for a new forum member.
We are a friendly bunch here Martin, so help us by giving us a bit more info and we will do our best to help you :)
Cheers,
Chris
I didn't like the post for obvious reasons and provided critisism so the author could do something about it. Why would I need to post a reply for that? If that isn't what the downvoting is for then I don't know why else we would need it at all. Especially if it immediatly leads to a discussion on the vote instead of the post itself.
I do agree that downvoting might not be the best welcome for some. If I had known that this was his first post perhaps I would've reacted differently. On the other hand, though, I do think we can expect most developers to have some experience on forums these days. I'm pretty sure that simply asking for stuff is frowned upon pretty much everywhere.
Thanks all for your replies.
I for now have a top ten list built in xlst wich sorts the post on @updateDate
and the list works just fine but now i need to find a way to sort after the pages who has been most viewed and cant find out how.
Here is the code i use:
<xsl:variable name="source" select="1062"/>
<xsl:template match="/">
<div class="divPush">
<h2>Läsartoppen</h2>
<ol>
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/descendant::node [string(data [@alias='umbracoNaviHide']) != '1'][@nodeTypeAlias = 'AOB-Contents Page']">
<xsl:sort select="@updateDate" order="descending" />
<xsl:if test="position() < 11">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:if>
</xsl:for-each>
</ol>
</div>
Thanks again
Br
Martin
I found this anyone who can explain how to use that in an xlst file ?
Br
// Get the ten most popular pages from the whole website last week as an ordered html list and append it to a literal control SortedList results;
results = umbracoStat.Businesslogic.Library.GetMostPopular(-1, 10, DateTime.Now.AddWeeks(-1), DateTime.Now);
// Loop through results and display as an orderedList
IDictionaryEnumerator ide = results.GetEnumerator();
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<ol>");
while (ide.MoveNext())
{
umbracoStat.Businesslogic.StatItem statItem = (umbracoStat.Businesslogic.StatItem) ide.Value;
sb.Append("<li><a href=\"" + umbraco.library.NiceUrl(statItem.Id) + "\">" + statItem.Name + "</a>: " + statItem.Hits + "</li>\n\r");
}
sb.Append("</ol>");
LiteralStatList.Text = sb.ToString();
Martin
is working on a reply...