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.

Structure Entries + Categories question

June 21, 2011 1:41pm

Subscribe [2]
  • #1 / Jun 21, 2011 1:41pm

    Paw Paw

    43 posts

    I’m using structure entries to display a hierarchical list of files.  I want to organize these files by category on the same page with headers.

    Example:

    Red Vehicles
    -Red Car
    -Red Truck

    Blue Vehicles
    -Blue Car
    -Blue Motorcycle
    -Blue Truck

    I’m having an impossible time getting structure entries to play well with categories and vice-verse.

    I used categories archive, but this list ALL of the entries that have a particular category assignment.

    Is there a way to filter categories archives by structure entry?

    Does anyone have experience with this or a work-around?

  • #2 / Jun 21, 2011 3:08pm

    Paw Paw

    43 posts

    I created a work-around using php.
    I created a custom dropdown field that contains a list of categories.  Then I create my headers based on the field.

    This code goes at the top of my structure entries loop

    <?php          
      if ($Header != “{cat_type}”){
    $Header = "{cat_type}”;
      echo “<h3 class=‘header’>” . $Header . “s</h3>” ;
          }           
    ?> 

    The only problem is that Structure can not orderby.  So I just have to make sure my entries with the same category are next to each other in my structure hierarchy.

    No perfect, nor user friendly.  I sure hope structure include category and orderby support in the future

  • #3 / Jun 22, 2011 5:11am

    John Henry Donovan

    12339 posts

    Paw Paw,

    Structure is a third-party addon which we don’t support. They have their own support forums though and will be able to help you there.

    There are also 2 add-ons available which helps Structure to play nice with categories called Freebie and Zoo Triggers

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

ExpressionEngine News!

#eecms, #events, #releases