Hierarchical Structure plan and problems so far

What I want to do is have drill down geographical hierarchies,

Continent (Root Page) => Continent (Child page of root) => Country (Child page of continent) => State (Child of Country Page) .

At the state level offer a blog registration that can be set up at the community level ie North America => United States => New Jersey Blog title "Absecon-Island-NJ" or "Ocean-City-NJ". I then want a blog roll associated with the state to show what blogs are available for example in NJ. Can a blog have sub blogs? ie NJ Blog, Ocean-City-NJ child blog?

What would you recommend as the best way to do this. Just because I have pages set up right now, I can change?

  • BobSgt

    I did not think so.

    So with header display of child page at history-of-surfing.com:

    At root (History-of-surfing.com)
    Header displays children (Continents)
    Column all pages and child pages displayed of the hierarchy (Root/Continents/Countries/States

    From Root header, click on continent goes to URL http://history-of-surfing.com/about/north-america/ header display remains at Continent level, no children of north america pages displayed
    From Root column, the same

    At this point the only option is working from the column.
    From any level, clicking on the column at these points results in these changes:

    United States, goes to URL http://history-of-surfing.com/about/north-america/united-states/ and displays united states in the header. Once United States is displayed in the header, clicking on the header does not change anything.

    Clicking on any state in the column http://history-of-surfing.com/about/north-america/united-states/new-jersey/ and displays all states in header

    Code is as follows:

    <div id="header">
    <div id="header-content">
    <div id="header-top">
    <h1>/"><?php bloginfo('name'); ?></h1>
    <div class="description"><?php bloginfo('description'); ?> </div>
    </div>

    </div>
    <div id="top-nav">
    <ul id="pagetabs">

  • " title="Home">Home
  • <?php if($post->post_parent) {
    $parent_title = get_the_title($post->post_parent);
    //$current = '<li class="header">' . $parent_title . '';
    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&depth=1&sort_column=menu_order&echo=0");
    } else {
    //$current = '<li class="header">' . get_the_title($post->ID) . '';
    $children = wp_list_pages("title_li=&child_of=".$post->ID."&depth=1&sort_column=menu_order&echo=0");
    }
    ?>
    <div id="sidecolumn">

    <?php if ($children) { ?>
    //<?php echo $current; ?>
    <?php echo $children; ?>
    <?php } ?>

    </div>

    </div>

  • Hiranthi

    To be honest I can't really tell if you're asking for help in your latest post or just stating something.

    By what I'm seeing I guess the problem (or it would be my problem if it were my case) is that the first submenu (when you're on the North America page) isn't shown on the second subpage (United States page).

    Oh, by the way this:
    //<?php echo $current; ?>
    should be this:
    <?php // echo $current; ?>

  • BobSgt

    Definitely asking for help.

    I am trying to enable a blogger to create blogs/content management for the history of surfing in their specific local. So i have a multi faceted challenge.

    1 - getting the blog established with a name that reflects local area/city

    2 - establishing a category or blog type that enables blogs to be grouped(i.e History-of-Surfing.com/absecon-island-nj), which would be either category or blog type of the following; North America, United States, New Jersey

    3 - enabling location hierarchy and/or search that finds the blog based primarily based on local. So a user who is looking for history on a location in NJ can drill down through pages to see what has been done in NJ, or search New Jersey and get to the page or a list of blogs of category or blog type New Jersey.

    So I have been trying to work on a page hierarchy that will lead a visitor through the geography to a state level by using child pages that display in the header the child pages of the parent that you are currently viewing. So if you are at root you see the list of continents, if you are at continent you will see a list of countries, if you are at country you will see a list of states, if you are at states you will see in the right column a list of blogs for the specific local.

    I have set up a WPmu on the site and am prototyping to get the right structure on the site. Any guidance or suggestions are welcome. Is there anything else that you need to know to give an opinion?

  • Andrew

    Hiya,

    If I were handling this as an Incsub project what I would do is the following

    1) Make a custom version of the blog types plugin that would basically have three types: Country, State/Province/Area, City

    2) I would then create a plugin to handle the frontend pages listing blogs you discussed. Basically it would work similar to the plugin we use for tags:
    http://consumerbrigade.com/tag/computer/latest/

    3) Lastly I would create a plugin that searches through the post indexer table based on the blog type.

    Now obviously this isn't the only way to pull off what you're after and it would definitely require some custom coding. However, hopefully it will help in some way. If you have any specific questions feel free to ask.

    Thanks,
    Andrew

  • BobSgt

    Thank you Andrew.

    Deeper than I was hoping to go, but I will give it a try. I have a lot of learning to do, before I can accomplish what I am hoping to accomplish. I still can't even get the headers displaying he child pages of child pages yet. Is there a good php book that you can recommend? How about a debugger?

    Also, in the left column of the consumer brigade it lists blog types (appliances etc) that are click down menus. Is that accomplished with a plug in or is that custom code for consumer brigade?

  • Andrew

    Hiya,

    I still can't even get the headers displaying he child pages of child pages yet.

    I'm afraid I can't be of much help on this one. I rarely work with themes.

    Is there a good php book that you can recommend?

    I'm sure there are good books out there but I haven't read any of them. I'm more of a 'learn by example' kind of person. For very basic tutorials I'd recommend . Other than that I'd suggest just looking through the code of existing plugins and taking note of how certain things are done. For anything else php.net should have you covered.

    How about a debugger?

    Just setup a basic LAMP box at home and enable all error reporting. If there's an error it will be displayed when you view the script in a browser.

    Is that accomplished with a plug in or is that custom code for consumer brigade?

    That bit was custom coded for them. The code is actually in the theme.

    If you're going to put a feature like that on the frontpage then definitely build in caching so that it's not running a ton of queries on each page load.

    Thanks,
    Andrew

  • burtonkent

    Andrew,

    You wrote: 2) I would then create a plugin to handle the frontend pages listing blogs you discussed. Basically it would work similar to the plugin we use for tags:
    http://consumerbrigade.com/tag/computer/latest/

    It looks like this plugin can modify/block redirects? I can't find the plugin anywhere, is it freely available?

    Redirects have always been a problem for me, and I'd like to see how it handles them. Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.