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 ForumsRepositoryRepositoryPre-select a category in listingPre-select a category in listing
Previous
 
Next
New Post
3/26/2009 6:50 PM
 

Hi,

I have a repository with several categories. I would like to have a link on another page that takes you to the repository with a certain category pre-selected and the repository filtered accordingly. For example, "Click HERE to view repository for category XYZ." I'm not sure if this might be done using Javascript to detect a URL variable and reload the page accordingly (not ideal since the repository takes several seconds to load), or maybe a server side ASPX script.

Has anyone done this or could suggest a solution?

Thank you,

Simon.

 
New Post
3/28/2009 9:35 AM
 

Yes you can. First thing you need to do is find out the CategoryId of the Category you want to display. If you have access to the database look at the RepositoryCategories table. You could also query the table using the Host=>SQL page.

What you need to do is add a querystring parameter named 'grm2catid' and set it's value to the ID of the Category you want to display.

Example: Let's say the URL to the page with your Repository module is
http://www.gooddogs.com/dotnetnuke/Downloads/tabid/100/Default.aspx

and you've determined the CategoryId you want to auto-select is 17. Modify your link to look like this
http://www.gooddogs.com/dotnetnuke/Downloads/tabid/100/grm2catid/17/Default.aspx

 
New Post
3/28/2009 4:03 PM
 

Hi

It happens that I had exactly the same question so thanks to both of you (for asking and answering).  However I also wanted to ask if I can set a default value for the category field in the form? What I want to do is to have several instances of the same repository on different tabs and depending on the hosting tab have anoter default value selected. I guess I can use js to do it but I thought maybe there is a more elegant way. Finally I wandered if the Select: Single attribute for the CATEGORIES token in form sould work? I tried it several times however I always get a checkboxs list never a radio buttons one.

I'm on DNN 4.9 repository ersion 3.1.15.

Thanks,

OrenG

 
New Post
4/22/2009 4:33 PM
 

Thanks Steve - that works perfectly! A follow up question is whether it's possible to do the same thing with a custom attribute dropdown list. Is there any way?

Cheers,

Simon.

 
New Post
4/23/2009 12:46 PM
 

yes, the querystring paramters is 'attrib'.   So you have to do a little digging into the database to get the IDs of the attributes you want, then add an attrib name value pair to the querystring, with the IDs as a comma delimited value

So to extend the previous example, if you wanted to pre-select category ID 17 and also pre-select attributes 12 and 17 the URL would look like this...

http://www.gooddogs.com/dotnetnuke/Downloads/tabid/100/grm2catid/17/attrib/12,17/Default.aspx

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryPre-select a category in listingPre-select a category in listing


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