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 ForumsXMLXMLHelp needed using fallback values for querystringHelp needed using fallback values for querystring
Previous
 
Next
New Post
5/24/2007 2:57 AM
 

Hi Stephan,

in the announcement you write about "fallback values" if parameter is not present.

I would like to use this feature, but can't get a clue on it. My problem is the datasource is a web-service and it needs a parameter like "filter=6". It won't work without this parameter. So I have used a link page to call the real page with the xml-module and use a pass-through parameter to set the value. That works so far, but the breadcrumb will have the wrong link and if you click on it, the webservice breakes.

Now how can I avoid this, using the fallback value ? Is it possible to say: If there is no passthrough value "filter=something" use the default value "filter=6" ? Or did I understand this feature completely wrong ?

Please kick me into the right direction.

Regards

Thomas

 
New Post
5/24/2007 5:51 AM
 

Hi Thomas,

I think you got it right, but the current implementation of the xml module doesn't help you. The glue is that not all parameter type support fallback value.

A parameter has 4 different properties (here explained in the context of the data source)

Name Name of the parameter, used as name of the querystring parameter to access the data by url 
required (boolean) If no value can be retrieved, no http request will happen
Data origin The source of the parameter
(unnamed)

Depends on the data origin!:

  • Static Value: the value of the parameter
  • pass through query string, pass through form and custom user property acts like the x in a function f(x) = y 
    For a passthrough query sting this is the name of the querystring parameter of your DotnetNuke page
  • portalId, moduleId, tabname,...: not needed, therefor not visible, these data origins will return everytime a value
  • user's city, fax....: they might be null or empty, so you can decalre a fall back value

So fall back values are not supported for your scenario.

Saying that I might point to the advanced settings: The last paragraph allows you to enable/disable xsl modules based on querystring values! This offers the ability to communicate between different xsl modules on one page.

So you add an xml/xsl module and that up the following querystring parameter:

Name: "filter", required=true, Data origin =querystring pass through, (unnamed) = "MyFilter"

The http request of this  will only execute if the url of your dnn site has a parameter MyFilter=SomeThing. otherwise it will return <noData cause="Parameters"/> as xml. You can write your stylesheet that it will return no content at all!

Now add a second module, and set it up the same way as the one before. But now you define the querystring parameter name on a different way:

Name: "filter", required=true, Data origin =static value, (unnamed) = "6"

in advanced settings you will set: Query string parameter= "MyFilter", Query String value=""

The result is that you have 2 modules on your page. The first one will fire if you have the query string parameter "myFilter", the second one only if it is missing or has an empty value.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLHelp needed using fallback values for querystringHelp needed using fallback values for querystring


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