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.

issues with the homepage and URL structure

October 14, 2011 10:39am

Subscribe [3]
  • #1 / Oct 14, 2011 10:39am

    James Hurst

    48 posts

    I am trying to find a solution to a problem, that seems to affect a few people.

    We have removed index.php and have everything running smoothly -

    So on our ‘homepage’ that you can see here:
    http://curestudio.com.testing.curenet.dh.bytemark.co.uk/work/

    We have the channel entries being pulled in, as the url structure is in tact. But when people land on http://curestudio.com.testing.curenet.dh.bytemark.co.uk/

    The {segment_1} is missing, and therefore we are not pulling the channel entries, or highlighting where we are in the navigation (and of course we have created two places showing duplicate information).

    In an ideal world i’d love to find a way of forcing the page, when a user lands on:

    http://curestudio.com.testing.curenet.dh.bytemark.co.uk/

    To go through to

    http://curestudio.com.testing.curenet.dh.bytemark.co.uk/work

    Does anyone have any advice!

    James

  • #2 / Oct 14, 2011 11:48am

    Kurt Deutscher

    827 posts

    Hi James,

    I think this is what you are looking for to fix the segment_1 issue with the home page:

    Set the “work/index” template as the site’s index page.

    Select the “work” template group and click on the “Edit Group” button.

    Check the box next to “Make the index template in this group your site’s home page?” then click “Update”

    The {segment_1} is missing, and therefore we are not pulling the channel entries, or highlighting where we are in the navigation (and of course we have created two places showing duplicate information).

    When we set up a link back to HOME in the navigation, we add this simple conditional:

    {if segment_1 == ""} class="selected"{/if}

    That gives us the “highlight” for home.

    example: http://holtz.com/

  • #3 / Oct 14, 2011 1:50pm

    James Hurst

    48 posts

    Hi Kurt - thank you that has done the trick (almost)

    We are using Build With Structure for the nav - and I can’t get my head around how to add the class active if segment_1 is empty…

    Let me know if you have any other tips!

    Thanks again -
    J

  • #4 / Oct 14, 2011 2:10pm

    Kurt Deutscher

    827 posts

    Hi James, glad the first part helped. I’m probably the last person you want for help with “Structure”. We use another solution at our shop, and I’ve never seen how Structure’s nav tags work. I’ll bet they could get you that support though.

    Good luck to you with your project.

  • #5 / Oct 14, 2011 4:56pm

    Kevin Smith

    4784 posts

    Thanks for the help, Kurt!

    James, I’d recommend working with the Structure guys on your questions about Structure. Was there anything else we can help you with here?

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

ExpressionEngine News!

#eecms, #events, #releases