Category Menu

45 posts by 4 authors in: Forums > CMS Builder
Last Post: August 21, 2009   (RSS)

By design9 - June 23, 2009

Hello,

Forgive me is this question has already been addressed. I looked around on the forums but couldn't find the answer I needed. I have built a category menu section so my users can add new categories whenever they need. My question is there a way to take the categories that are in the category menu section and populate them into a drop down list on my home page that links to a specific page that relates to that menu choice? My goal is once the client has input a new category in the backend, that it will automatically show up in the dropdown on home page without my assistance.

Thank you,

April

Re: [ross] Category Menu

By design9 - June 23, 2009 - edited: June 23, 2009

Thanks Ross!
I have done the test page called menutest.php and put the coding from the post you gave me. Here is the URL: http://www.carolinaparent.com/marketplace/menutest.php

The attachment is also included of the file. Let me know if you need anything else. If you could show me how to put the menu in a drop down list, that would be great!

Thanks!
April
Attachments:

menutest.php 3K

Re: [apdance9] Category Menu

By ross - June 24, 2009

Hi April

Thanks for posting that code. I had a look and think you can try something like this:

<!-- drop down menu for categories starts here -->
<select>
<?php foreach ($categoryRecords as $record): ?>
<option value="<?php echo $selectedCategory['name'] ?>"><?php echo $selectedCategory['name'] ?></option>
<?php endforeach; ?>
</select>
<!-- drop down menu for categories starts here -->


That will create a <select> menu and make each category an option.

Stick that at the bottom of your test page and let me know what you think :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Category Menu

By design9 - June 24, 2009

Thank so much Ross!

When I placed the code that had
$selectedCategory['name'] I got an undefined error message (see url page example) and when I switched it to $record['name'] it worked great.

http://www.carolinaparent.com/marketplace/menutest.php

Now, I was wondering what would be the best way to make the categories in the drop down hyperlink to a page? Would it be best to set up an URL field and set it up similar to the external link example?

This is what I will be trying to do:
I create the menu section where the user will input the categories. This will be the drop down on the home page. Then I will create a multi-record section that will have advertisers information and their web ad. The ads will fall into one of the categories in the drop down menu. I want the category menu to link to a page that will display all the advertisers/ads that bought an ad for that category. Example: Adoption category in drop-down list will link to page that shows all the advertisers and their ads that relate to Adoption.

Not sure the best way to make this happen and how to create the links.

Thanks so much for your help!
April
Attachments:

menutest_001.php 4K

Re: [apdance9] Category Menu

By ross - June 25, 2009

Hi April

That looks great! Glad you got it going :).

Where do you want these pages to link to? Does each category have a specific URL that you want to use?

There are definitely a variety of options so I want to see what you are aiming for first :).

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Category Menu

By design9 - June 25, 2009 - edited: June 25, 2009

Hi Ross,

I have been playing around with this some but this is what I want to accomplish.

I am trying to build a marketplace area on the website where I can post featured web ads, coupons and classifieds.

On the Home Page, I will have the drop down list that displays all the various categories and an ALL link that will display all the categories.

I then want the "All" to link to a page that will list all the various categories and all the advertisers/ads in each categories. The specific category will link to a page that only list the advertisers/ads for that category only. These pages will contain a table that lists the advertiser name and then a chart that will have a check mark by what they are offering. Then we the user clicks on the advertiser name, it will take you to the details page for that advertiser and show their web ad or coupon or whatever they offer. See example: http://www.carolinaparent.com/marketplace/marketplace.php ...(click on camp invention to see details page with sample ads)

I would also like to have some links on the ALL Page that will show all featured ads, then a page that shows all coupons, etc. Hope this makes sense! Any ideas of how to put all of this together so it can be updated by the client and I would not have to go in and create a new page etc. would be great!

Thanks! April

Re: [apdance9] Category Menu

By ross - June 26, 2009

Hi April

I think I get it :).

If you select any of those options in the drop down, you'll go to a page that lists items from only that category.

If you select the "all" option, you'll get a list of all the items.

Does that sound about right? Do you have a template for that? Or is that what you linked me to in your last post?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Category Menu

By design9 - June 29, 2009

Hi Ross,

Yes, that is right. The page I linked you will be the table structure that will contain all the information that will go on the final design page.

Thanks!

April

Re: [apdance9] Category Menu

By ross - June 30, 2009

Hi April

That's perfect. You have the drop down now. All you need is some javascript to do the page changing based on the value.

Give it a shot and let me know where you get to :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/