Developer forum

Forum » CMS - Standard features » Datalists: get record matching paragraph header??

Datalists: get record matching paragraph header??

Jacob Storgaard Jensen
Reply
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?


Replies

 
Pavel Volgarev
Reply
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
 
Jacob Storgaard Jensen
Reply
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
Reply
Hi Jacob,

I don't think that's possible.

-- Pavel 
 
Jacob Storgaard Jensen
Reply
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?
<?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