DNN Professor Member Login
January 06, 2009

 You Are Here: ..:: Blog ::..
DNN Professor Blogs

DNN Professor Blogs

DotNetNuke and Intenet Marketing meanderings from Buck and Friends.

Nov 15

Written by: Buck Anderson
11/15/2008 4:01 PM 

Many of you have asked how to create a linked category dashboard directory for  the Business Directory XMod application. Here is how you do it...

Many of you have asked how to create a linked category dashboard directory for the Business Directory XMod application. Here is how you do it.

1. Create a HTML category list of your categories previously created in the Business Directory form. In this example, we have created this category list on a separate page form the main Business Directory page.

XMod Category Dashboard

Category Link Result

The above link is created by adding the TabID of the page where your Business Directory application is located. In this case the TabId is 117.

The xmmid is the number XMod has assigned to the instance of the XMod module you are using for Business Directory. You can locate this value by viewing the source of the page and look for a similar line of code like 'div id="dnn_ctr494_XModDisplay_pnlListView'.

The ctr number will be the one you will use in the link code above.

The next value is 'cat'. This is the querystring parameter we wiill pass to XMod. In this case, we want to return results for the category Videographers. Our link code is '/cat/Videographers'

The final portion of the link code is determining which view we want XMod to return. View 1 is is a XMod list view and View 2 is a XMod detail view. In the example above, we want to return a list view of all listings for videographers. The link code is 'xmview/1'

Continue to build these links for each category by simply replacing the category value in each link. (Example: cat/Bridalware - Tuxedos or cat/Rings - Jewelry) Pay careful attention to capitalization and enter these values exactly as you have them on your Business Directory form.

XMod Filter Options

2. Next you will need to configure XMod to accept the parameters of the links that you have created. You will do this by going to your Business Directory instance >> Configure XMod Module >> Data Settings >> DNN Filter Options >> Filter Using URL Parameter.

Check the box titled Filter Using URL Parameter. Select the form control cboCategory and check the three boxes to the left and then enter the word 'cat' in the textbox to the right. Save changes.

Note: If you are also using sub-categories, you would also select the URL filter, SavedSubCategory and give it a name of sCat. As an example, if your category name was Boats and your sub-category under Boats was fishing, then your link would be:

 

 

 

/tabid/117/xmmid/494/cat/Boats/sCat/fishing/xmview/1/Default.aspx.

And that is how simple it is to create a category dashboard for the Business Directory.

Tags:

2 comment(s) so far...

Re: How Do I Add a Linked Category Dashboard to Business Directory?

Buck, as usual, great article. Thank you.

But I do have a question. I just implemented the solution above, and it works like a charm. However, the client has requested a search box on the page, is this possible to implement?

Let me know.

Thank you.

Rafael

By Rafael on   12/10/2008 4:28 PM

Re: How Do I Add a Linked Category Dashboard to Business Directory?

Rafael,

The creation of a search box would need to be created in a new XMod form. The value of the search box would need to pass URL querystring parameters to the Business Directory's main listing page.

The problem I see is what the user may type into the search box and can you capture the input values into a parameter that Xmod will recognize.

For example, if the user typed New York and you are passing a value to the Business Directory cboState="New York" that would work. But, they could type anything in.

A better solution would be to create a dashboard with Select dropdown boxes where the user could select a specific set of values.

Example: Search by State would have a dropdown box populated with the states. This could easily be passed to the main form.

You need to create a new XMod search form with your search criteria fields populated from your listings.

When you hit search you are redirected to a URL with querystring parameters constructed from your selected search criteria.

On the destination URL your XMod list view is filtered by the URL parameters.

If you look at the Business Directory List View or detail View templates, you will see how I build a URL, with querystring, to pass to the Inquiry form when you click the more info button. Same principle.

In the XMod help (http://dnndev.com/help/xmod/default.ht) look at the following:

Redirect
URL Parameters
URL filtering

I have the 'Creation of a Search Form' now in my notes for an upcoming article in the members area.

By Buck Anderson on   12/10/2008 4:27 PM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
Search  
Blogs  
Archive  

Copyright 2008 by Jive Media Group LLC. All Rights Reserved.  | Terms of use | Privacy Statement | Email White Listing