Show only certain categories in CompanyDirectory?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
beherenow_uk
Forum Members
Forum Members
Posts: 103
Joined: Fri Nov 28, 2008 11:26 am

Show only certain categories in CompanyDirectory?

Post by beherenow_uk »

Hi,

Using CompanyDirectory, is it possible to show only certain categories of companies on different pages in the categorylist view?
Something like {CompanyDirectory action="categorylist" category="Category 1, Category2, Category5" }

would show:

Page 1
• Category1
• Category2
• Category5

And {CompanyDirectory action="categorylist" category="Category3, Category4, Category6" } on page 2 would show:

Page 2
• Category3
• Category4
• Category6

I know this can be done in the new module using browsecategory, and then specifying which ones to show in a comma seperated list. But i'd like to try and achieve this with company directory too.

Any help would be much appreciated.

Thanks.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Show only certain categories in CompanyDirectory?

Post by Dr.CSS »

I think the category call is in the Help...
beherenow_uk
Forum Members
Forum Members
Posts: 103
Joined: Fri Nov 28, 2008 11:26 am

Re: Show only certain categories in CompanyDirectory?

Post by beherenow_uk »

Well, there is a selectcategory="0" param, but that shows all of the categories with a submit button. This is a perfect solution apart from I'd like to specify which categories show up in that drop down list.

I tried this alongside the category="" param but it didn't work as I hoped. Perhaps there's something that I've missed?

thanks.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Show only certain categories in CompanyDirectory?

Post by Dr.CSS »

It looks like selectcategory is for a drop down or something where you can select what category you want or ?...

(optional) selectcategory="0" - If this parameter is set, then a form will be generated allowing users to interactively filter company records on a single category. This flag should not be used in conjunction with the 'category' parameter.

(optional) category="" - When used in the default summary mode, this parameter, which should match the name of an existing category will be used to display only those companies that are in that category. (a comma seperated list can be supplied).
beherenow_uk
Forum Members
Forum Members
Posts: 103
Joined: Fri Nov 28, 2008 11:26 am

Re: Show only certain categories in CompanyDirectory?

Post by beherenow_uk »

Yes you're right, the selectcat param shows the dropdown with all categories in the dropdown and the 'category' param allows you to show only certain categories, bur not in a dropdown. Putting these together would seemingly be perfect but unfortunately u can't use them together.

The result in trying to achieve is like this: http://www.qs-csa.co.uk/subpage.cfm?pageName=projects

Perhaps I should ask for commercial help on this one? I have a little bit of budget, so if you could maybe quote me Dr CSS?, or perhaps point me towards another dev that could? Really need to get the same functionality as the URL I show. CompanyDirectory is almost perfect for my needs, just this last issue is slightly beyond my knowledge.

I have a test site I can give access to if required.

Thanks!
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Show only certain categories in CompanyDirectory?

Post by jmcgin51 »

I think you might have to build the dropdown manually, based on your filtered list of companies from the CD call

something like this (UNTESTED)

{capture assign='filtered_list'}{cms_module module='CompanyDirectory' category='1,2,3,4,5'}{/capture}

then parse the resulting $filtered_list array using a foreach statement and putting each item into a dynamic <select> list.

Obviously sponsoring the feature would be more elegant, but if you need to get this done now, I think it can be done as I've outlined above.
Post Reply

Return to “Modules/Add-Ons”