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.

EE1.x: filter weblog entries by category

October 29, 2010 5:26pm

Subscribe [3]
  • #1 / Oct 29, 2010 5:26pm

    Ramya108

    123 posts

    How can I filter weblog entries by a certain category?

    I found this form and it works, but I have several questions. What if I would like to specify multiple weblogs? And how to specify a certain category group?

    Thank you!

    <form method="post" action="{path='template_group/template_name'}">
    <select name="category">
    {exp:channel:categories channel="your_channel_name" style="linear"}
    <option value="{category_id}">{category_name}</option>
    {/exp:channel:categories}
    </select>
    <input type="submit" value="Go!" />
    </form>

    Moved to CodeShare Corner by Moderator

  • #2 / Oct 30, 2010 9:52am

    Ramya108

    123 posts

    Figured that out.

    Another problem: I want to have nested categories, but even when I add “nested”, it is shown in the linear style.
    Any clue on how I can fix this?
    Link to that particular page:
    http://www.alternativa-za-vas.com/index.php/proizvodi/products

  • #3 / Oct 31, 2010 6:23pm

    Greg Salt

    3988 posts

    Hi Ramya108,

    Glad that you got the initial issue sorted out. I’m not sure what is not working on the template you have linked to. Are you using the Weblog Categories tag with the style=“nested” parameter?

    Cheers

    Greg

  • #4 / Oct 31, 2010 7:11pm

    Ramya108

    123 posts

    Yes!

    Here is the code:

    <form action="{path='proizvodi/selected/'}" method="post">
        <select name="category">
           
    {exp:weblog:categories weblog="calivita" style="nested"}
    <option value="{category_id}">{category_name}</option>
    {/exp:weblog:categories}
        </select>
        
    <input type="submit" value="Submit!"></p>
    </form>
  • #5 / Nov 01, 2010 10:45am

    Sue Crocker

    26054 posts

    Ramya108, if you view the source for that page, you’ll see that the content is nested. I don’t think that’s really want you want, though. Are you just wanting to have your options look different depending on whether or not they’re a parent or child?

  • #6 / Nov 01, 2010 4:52pm

    Ramya108

    123 posts

    Are you just wanting to have your options look different depending on whether or not they’re a parent or child?

    Yes, this is what I want!

    For example,

    Viruses
    - Herpes simplex
    - Herpes zoster
    Bacteria
    - Helicobacter
    - Streptoccocus

    and so on.

  • #7 / Nov 02, 2010 9:42am

    Sue Crocker

    26054 posts

    You’ll need a third party add-on of some sort.

    http://ellislab.com/forums/viewthread/146532/ has one you might be interested in, or you can look on Devot-ee.com for more.

    Moving to CodeShare Corner for additional community support.

  • #8 / Nov 02, 2010 6:23pm

    Ramya108

    123 posts

    Thank you, Sue!

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

ExpressionEngine News!

#eecms, #events, #releases