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.

Help with this kind of weblog

January 05, 2009 11:58pm

Subscribe [2]
  • #1 / Jan 05, 2009 11:58pm

    kriz

    231 posts

    Hello,

    Im trying to do something rather simple, but dont exactly know how to do this in EE.

    Ive got 3 things. Continents, Countries and Cities

    A city belongs to a country, and a country belongs to a continent

    In my template, I need to display it as the following (for example):

    Europe
    ..France
    ....Paris
    ..Italy
    ....Milan
    ....Rome
    ....Venice
    ..UK
    ....London
    ....Leeds
    ....Manchester
    Africa
    Americas
    Asia
    ..Philippines
    ....Manila
    ....Makati
    ..Japan
    ....Tokyo
    Australia
    Canada
    North America

    How should I structure my weblogs? Or should I have categories? Where should I apply relationship fields?

    Hoping to hear from someone soon.

  • #2 / Jan 06, 2009 3:20am

    kriz

    231 posts

    Anyone?

  • #3 / Jan 06, 2009 3:38am

    Ingmar

    29245 posts

    A number of ways but, yes, I’d probably use nested categories on that one. Or, perhaps, make the continents weblogs of their own, it all depends on your needs.

  • #4 / Jan 06, 2009 4:01am

    kriz

    231 posts

    I tried having each of them in their own weblogs and display them as such:

    {exp:weblog:entries weblog="s_continents" disable="catgories|member_data|trackbacks" sort="desc" dynamic="on" paginate="bottom"}
    
                        <h3>{title}</h3>
    <p>                    <br />
                        <ul class="clearfix"><br />
                            <br />
                            {reverse_related_entries weblog="s_countries_states" sort="desc" orderby="date"}<br />
                            <br />
                                <li><a href="http://{url_title_path=/scrivoo/post}">{title}</a></li><br />
                                                                                        <br />
                            {/reverse_related_entries}<br />
                                                <br />
                        </ul><br />
        <br />
                    {/exp:weblog:entries}    <br />
                    <br />
                    </p>
    
    
    
    <p>

    When the page is rendered, it will display it like this:

    Europe
    Italy

      - Rome

    Asia
    Philippines

      - Manila

    Europe
    UK

      - London

    Europe
    Italy

      - Milan

    If you noticed above, it is repeating Europe and Italy and Europe and UK again. I need it to group the results and display like this:

    Europe
    Italy

      - Rome
      - Milan

    UK

      - London

    Asia
    Philippines

      - Manila

  • #5 / Jan 06, 2009 4:06am

    kriz

    231 posts

    Ingmar, Im willing to scrap whatever I have now, if you have a better / working alternative solution I can use instead

  • #6 / Jan 06, 2009 4:36am

    kriz

    231 posts

    Ingmar, not sure if the issue I expressed above was clear. Let me know so I can further clarify it

  • #7 / Jan 06, 2009 4:54am

    kriz

    231 posts

    Any updates on this? Its the only thing thats keeping us at a standstill atm

  • #8 / Jan 06, 2009 5:27am

    kriz

    231 posts

    This sort of thing could have worked if it were possible to nest a {related_entries} inside {reverse_related_entries}

    Im starting to think that something so simple as this issue doesnt look like it can be done in EE

  • #9 / Jan 06, 2009 7:44am

    Rob Allen

    3114 posts

    kriz - can you give us an idea of how you want to arrange the content for each country/city etc? This will help us to understand what you’re trying to achieve. I’m presuming you will want content entries that are tied to a specific location - that’s easily done by using categories but I’m not sure what you’re trying to do with related entries.

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

ExpressionEngine News!

#eecms, #events, #releases