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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...passing url variables from module to settings and backpassing url variables from module to settings and back
Previous
 
Next
New Post
4/29/2011 6:00 PM
 
I have a module that is using a URL variable to get  information. The problem is if the user goes to the settings for the module and then clicks save, the module no longer has the url variable. Is there a way to pass the url variable to the settings page and then from the settings page back to the module? Thanks
 
New Post
4/30/2011 4:16 AM
 
if you save the setting using DNN API for ModuleSettings / TabModuleSettings table, it should be properly included in settings collection of the module. See e.g. HTML module as a sample.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
5/1/2011 1:00 AM
 
Javier Mas

As i understand you mean you have DNN with link to the page like http://site.com/Products.aspx?ProductID=123 Then you go to the settings of module and when return from the settings, then you lost your params and URL looks like http://site.com/Products.aspx  Is it what do you mean?

If so, then i believe you have to:
1) Use Url Referer from your request to redirect back from the settings to the correct params.
2) May be you have to add some code to your module so it can allow for user to make a choice?

Sergey
 
New Post
5/2/2011 1:00 PM
 
Sergey
  You stated it correctly (and more clearly than I did)
This is what I was looking for but I was hoping for something with a little less string manipulation in it. I'd like to check to make sure what I'm thinking of doing isn't going to cause problems later.

The site is changing the url variables so  page?id=123 is listed as page/id/123. This means I can't tell the difference between the path and the variables and the UrlReferrer lists the whole thing as a path without any url variables.

the settings page is
https://mywebsite/pagename/ctl/Module/ModuleId/635
so I need to get 
https://mywebsite/pagename and append my "?id=123"

Is it safe for me to look in the request object, take everything to the left of "/ctl/" of the settings page to get the url to redirect to? Should I look for "/ctl/Module/" instead? It seems like if I just use "/ctl/", if someone names a page "clt" for some reason, that could cause problems. Is there anything else I should be looking our for?
 
New Post
5/2/2011 1:30 PM
 
Javier

You should use DNN methods NavigateURL from DotNetNuke.Common.Globals or EditURL. Just look at it - this is perfect. For example:


Response.Redirect(EditUrl(
"Admin"), true);

or

lnkEdit.NavigateUrl = EditUrl(
"MyID", ID, "Edit");

Hope this helps!

Sergey
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...passing url variables from module to settings and backpassing url variables from module to settings and back


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