Hi,
I've got a user database, from which I would like to extract one individual user to be shown frontend on one individual paragraph (one paragraph, one user). It would be great if I could get the user by using the ParagraphHeader as the request? Any way to do this with Data Lists?
Developer forum
E-mail notifications
Datalists: get record matching paragraph header??
Jacob Storgaard Jensen
Posted on 02/07/2012 14:51:21
Replies
Pavel Volgarev
Posted on 02/07/2012 15:38:46
Hi Jacob,
Not sure what do you mean by "ParagraphHeader as the request" but you can compose a custom SQL query in your data list and use request/session variables to pass the correct user name.
-- Pavel
Not sure what do you mean by "ParagraphHeader as the request" but you can compose a custom SQL query in your data list and use request/session variables to pass the correct user name.
-- Pavel
Jacob Storgaard Jensen
Posted on 02/07/2012 15:41:59
I know that I can pass the correct user name via an url variable. But in this case I just need to show an employee on any given page. When I attach the datalists module to a paragraph, I would like to use the paragraph header (The name of the paragraph) as the request variable.
Pavel Volgarev
Posted on 02/07/2012 16:05:50
Hi Jacob,
I don't think that's possible.
-- Pavel
I don't think that's possible.
-- Pavel
Jacob Storgaard Jensen
Posted on 02/07/2012 16:18:51
Hi Pavel,
If a change is made to what's outputted as default in the datalists xml output I think it would be possible... If DwParagraphName is added to the output, I can filter the result via xslt, which I'm using already...
This is how it looks now... just missing that one tag... DwParagraphName... can you move this post to feature requests?
If a change is made to what's outputted as default in the datalists xml output I think it would be possible... If DwParagraphName is added to the output, I can filter the result via xslt, which I'm using already...
This is how it looks now... just missing that one tag... DwParagraphName... can you move this post to feature requests?
<?xml version="1.0" encoding="utf-8"?> <Template> <DwPageUrl>/Default.aspx</DwPageUrl> <DwPageID>69</DwPageID> <DwParagraphID>37</DwParagraphID> <Global.Server.Date>10-02-2012</Global.Server.Date> <Global.Server.Date.Day>10</Global.Server.Date.Day> <Global.Server.Date.Hour>10</Global.Server.Date.Hour>
You must be logged in to post in the forum