2) The second one calulates which articles has the most pageviews within a certain period of time and displays them in a format for the Nivo Slider to read and display
I would like to change this to use the SQL database to record the Node, date published, and the pageview count. Currently the above xslt adds about 2 seconds to the rendering time. Hopefully moving to SQL will cut that time down a bit..:-)
I think this package http://our.umbraco.org/projects/developer-tools/a-sqlhelper-for-xslt could be something for you. Unfortunately I have not had the time to create an actual package with this extension yet (Shame on me! Hope that I can manage to throw it up on sunday) - But you should be able to download the source and compile it for yourself.
It makes it possible for you to fetch data easily from a stored procedure or write to a stored procedure from within your XSLT file.
When you fetch data it's returned as XML, which you can match the way you want to :-)
I hope that this helps even though I realise I need to describe this better and provide you with some usefull examples...I will keep you posted once the package is up and there are some example XSLT files.
I looked at that but I don't think it would work for me. I need to INSERT values to the database and well as SELECT. This only allows me to SELECT from what I can see.
Yes it indeed does...I'm sorry for my very late reply. Things just got crazy unfortunately.
But know there have been made packages for the project with the code snippets found in the documentation.
In order to be able to insert values into the database using the SqlHelper, you should be as mentioned be able to create a stored procedure, which you feed with the proper arguments from within your XSLT file.
Hope this helps. (If you have not found another way around it already)
How hard is it to use SQL commands in XSLT
I have two XSLT files I use for recording pageviews in Blog4Umbraco:
1) The first one calculates the number of papgeviews and republishes the document
http://www.pastie.org/private/zl32w7snrrahrooy4jiuw
2) The second one calulates which articles has the most pageviews within a certain period of time and displays them in a format for the Nivo Slider to read and display
http://www.pastie.org/private/vykewtun5mumnrxymlbia
I would like to change this to use the SQL database to record the Node, date published, and the pageview count. Currently the above xslt adds about 2 seconds to the rendering time. Hopefully moving to SQL will cut that time down a bit..:-)
Hi Shannon
I think this package http://our.umbraco.org/projects/developer-tools/a-sqlhelper-for-xslt could be something for you. Unfortunately I have not had the time to create an actual package with this extension yet (Shame on me! Hope that I can manage to throw it up on sunday) - But you should be able to download the source and compile it for yourself.
It makes it possible for you to fetch data easily from a stored procedure or write to a stored procedure from within your XSLT file.
When you fetch data it's returned as XML, which you can match the way you want to :-)
I hope that this helps even though I realise I need to describe this better and provide you with some usefull examples...I will keep you posted once the package is up and there are some example XSLT files.
/Jan
I looked at that but I don't think it would work for me. I need to INSERT values to the database and well as SELECT. This only allows me to SELECT from what I can see.
Hi Shannon
If you have created a stored procedure that inserts values into the database you should be able to achieve it with this package as well.
I will keep you posted once I have managed to get the samples in place on sunday.
Stay tuned! :-)
/Jan
And Sunday comes and goes..:-)
Hi Shannon
Yes it indeed does...I'm sorry for my very late reply. Things just got crazy unfortunately.
But know there have been made packages for the project with the code snippets found in the documentation.
In order to be able to insert values into the database using the SqlHelper, you should be as mentioned be able to create a stored procedure, which you feed with the proper arguments from within your XSLT file.
Hope this helps. (If you have not found another way around it already)
/Jan
is working on a reply...