I'm new to Umbraco and I "want" to (the right words would be have to) migrate an existing school site from AxCMS to Umbraco (4.0.4.2). For the most of the pages it was very easy to create them in Umbraco, but now I'm completely stuck.
For the courses page, I created a macro for the navigation and an additional macro to display the course data.
For querying the database I use the sql extension I found in the developers section of Umbraco.TV. It works fine, but is it possible to build the sql query string dynamically? I'm not a developer but an administrator, so creating an user control would be the worst case for me ;-)
My idea is to use a variable depending on the current node I've chosen in the navigation. The xslt-code so far:
I tried for hours, but I could not make it work. First of all I don't know where to put the variable inside the GetDataSet-method (I alays get parsing error messages) and I don't know if my idea will ever work. Can someone help me and explain it to a stupid admin?
First off, I would probably do this in an user control, and not in xslt, but I'm a developer, so..
You would want to put the variable outside the xsl:choose tag, and then I'm guessing you want to use the where variable somewhere in the sql you fire off.
I'm not familiar with the sql extension, so I'm just guessing here:
A quick note - when generating non-XML output like this, be sure to set the output method to "text" (e.g., this makes sure not to output < when you want a < )
How to build a dynamic SQL query string in xslt?
Hello everybody,
I'm new to Umbraco and I "want" to (the right words would be have to) migrate an existing school site from AxCMS to Umbraco (4.0.4.2).
For the most of the pages it was very easy to create them in Umbraco, but now I'm completely stuck.
For the courses page, I created a macro for the navigation and an additional macro to display the course data.
Structure is as follows:
Offene Seminare
-- Anwendungs-IT
---- Microsoft Office Anwendungen
---- Desktop Publishing Anwendungen
---- Anwendungen
--Technische IT
---- Netzwerktechnik
---- Betriebssysteme
---- Zertifizierungen
---- Datenbanken
---- Programmiersprachen
---- Software Engineering
---- IT-Management
-- Betriebswirtschaft/Vertrieb
-- Internationale Kommunikation
-- Management und Führung
-- Gesundheitsmanagement
Inhouse Seminare
Online Seminare
For querying the database I use the sql extension I found in the developers section of Umbraco.TV. It works fine, but is it possible to build the sql query string dynamically?
I'm not a developer but an administrator, so creating an user control would be the worst case for me ;-)
My idea is to use a variable depending on the current node I've chosen in the navigation. The xslt-code so far:
I tried for hours, but I could not make it work. First of all I don't know where to put the variable inside the GetDataSet-method (I alays get parsing error messages) and I don't know if my idea will ever work. Can someone help me and explain it to a stupid admin?
Thanks in advance
Peter
Hi Peter!
First off, I would probably do this in an user control, and not in xslt, but I'm a developer, so..
You would want to put the variable outside the xsl:choose tag, and then I'm guessing you want to use the where variable somewhere in the sql you fire off.
I'm not familiar with the sql extension, so I'm just guessing here:
Hi Peter,
A quick note - when generating non-XML output like this, be sure to set the output method to "text" (e.g., this makes sure not to output < when you want a < )
/Chriztian
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.