ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Category Drop down view all

February 28, 2012 3:02pm

Subscribe [1]
  • #1 / Feb 28, 2012 3:02pm

    Eastwood Design

    605 posts

    I have a category drop down and I want to add a view all that will either display ALL categories or simple redirect to a url which ever is possible

    <form method="post" dynamic_parameters="category|limit" action="{path="members/results"} ">
              <h4>Search by Region:  </h4>
    <p>            <select name="category"><br />
    {exp:channel:categories channel="members" style="linear" show_empty="no"}<br />
    <option value='{category_id}'>{category_name}</option><br />
    {/exp:channel:categories}<br />
    <option value='???'>View All</option><br />
                  </select><br />
    <input type="submit" value="Go!" /><br />
                <br />
             <br />
            </form>

  • #2 / Feb 29, 2012 1:42pm

    Dan Decker

    7338 posts

    Hi Eastwood Design,

    You could do something similar to what’s in the User Guide example:

    <form name="catmenu" action="">
        <select name="selcat">
            <option value="">--Select Category--</option>
            {exp:channel:categories channel="yourchannel" style="linear"}
                <option value="{path='channel'}">{category_name}</option>
            {/exp:channel:categories}
    <option value='{path=’template-group/template'}'>View All</option>
        </select>
    </form>

    In your template, you would have a channel entries tag that doesn’t use the category parameter.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases