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.

weblog:entries sorting by two different categories

October 19, 2010 5:25pm

Subscribe [3]
  • #1 / Oct 19, 2010 5:25pm

    Nickm1234

    5 posts

    Hi there,

    I am trying to list all weblogs within two categories.

    Categories: Countries and Tags.

    The way I have set it up is that I have list of countries and they are associated to weblog called “countries”. I then have another weblog called business which one of the custom fields is country and that is related to the “countries” weblog. I’m using the following extention to pull category id form the url http://loweblog.com/software/low-seg2cat/

    The code below should show the {title} of the businesses in a particular country in the tag category. I can on get one or the other to work, so sorting by country or the tag.

    {exp:weblog:entries weblog="countries" category="{segment_1_category_id}" }
    {reverse_related_entries weblog="business" category="{segment_4_category_id}" limit="10"}
    {title}
    {/reverse_related_entries}
    
    {/exp:weblog:entries}

    Any help would be appreciated.

  • #2 / Oct 20, 2010 10:06am

    Sue Crocker

    26054 posts

    I don’t believe that will work, but let me ask other members of my team to see if they have a workaround. Thanks in advance for your patience.

  • #3 / Nov 01, 2010 1:05am

    Nickm1234

    5 posts

    Is any one able to let me know how it should be done then?

  • #4 / Nov 01, 2010 3:27pm

    Ingmar

    29245 posts

    As Sue said, unfortunately that won’t work. In your case a custom SQL query might be the best option.

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

ExpressionEngine News!

#eecms, #events, #releases