Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLPagination with XML module?Pagination with XML module?
Previous
 
Next
New Post
7/16/2007 7:19 PM
 

Is anybody doing any sort of pagination with the XML module?

If so, how did you go about it?

 
New Post
7/17/2007 2:23 AM
 

I added XSLT based pagination for the new UDT release (3.4.0, currently in release tracker). It should be also doable with the XML module, using XSL parameter based on query strings.

 
New Post
7/18/2007 1:44 PM
 

Hmm, okay.

I designed my XSL sheet to say there is page 1, 2, 3. I'm not sure what's to happen next. I'm not sure if the XML module allows for interaction, for example of my <a href="blah-url?page=1">1</a><a href="blah-url?page=2">2</a> <a href="blah-url?page=3">3</a>.

I see that the XML module has

Querystring Parameters

Querystring URL Encoding

Security Options

and then under XSL Transformation Settings

Link Type URL

XSL Parameters (none set)

Advanced Options

 Output inside module

 Content Type *.xml.

 

Is the idea of XSL parameters and Querystring Parameters only one way? That is the XML module will only send what ever I enter in to the parameter to either the XSL or XML document but not expect things to be sent back so that I can dynamicly accept something? Such as a page=1 if the user clicks 1, or page=2 if the user clicks to.

 
New Post
7/18/2007 6:19 PM
 

Maybe it will be better to write a blog, so here are the basics:

You add an Xsl parameter, name it "currentpage", data origin "querystring pass through", and enter "getPage" as argument for the data origin.

Inside your xsl, you query that parameter:

< xsl:parameter name="currentpage" select="1" />

Now let us imagine a XML data source containing 230 elements in /root/element (serialized datatable with 230 rows)
You will have a pagesize of 15 elements. 230\15 = 15,33 ->16 pages

< xsl:variable name="elementsPerPage" select="15" />
 <xsl:variable name="totalNumberOfPages" select="ceiling (count(/root/element)-$elementsPerPage)" />

output your data

< xsl:for-each select="/root/element[position() &gt; (($currentpage-1)*$elementsPerPage) and position() &lt;=  ($currentpage*$elementsPerPage) ] />
.....

ouput paging:

< a href="?getPage={$currentpage-1}" >prev < /a> < xsl:value-of select="$current" /> < a href="?getPage={$currentpage+1}" >next < /a>

 
New Post
7/19/2007 12:03 PM
 

Yes, it worked!!!!! Thanks guys, your help is very much appreciated!!!! The XML module is a much more groovier module now that I know I can use the passthrough to send and recieve information to my XML generator.

Happy Snoopy Dance

I do have a suggestion or two though, instead of a blog, how about documentation? The About the XML/XSL Module doesn't explain anything like this, nor does the On Line help when On-line help is clicked. But I did find the Project Examples, which seemed a bit unclear to me while the above was more clearer. Might want to add that to your examples.

Something else, some what not related is that the text (page numbers) near little images for back, forward, and next get mucked up. Example I clicked Introduction To The XML/XSL Module Read More and it reports 3 of 3. Clicking the next and it says 100 of 3, clicking next then says 3 of 3. Somebody might want to look in to that, if that's what 4.5.4 RC3 does then yuck.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLPagination with XML module?Pagination with XML module?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out