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.

Segment 3 not showing?

April 09, 2013 1:30pm

Subscribe [1]
  • #1 / Apr 09, 2013 1:30pm

    Hi all,
    First of all sorry for the stupid question as I know this is very basic EE stuff but I have tried and tried and just can’t get my head round this issue and hope someone can help..

    What I am trying to do:

    I have the SolSpace user module installed and pulling the username of my members as segment 1 (e.g. http://www.domain.com/peter) now I have a channel where my users can enter a blog entry but I want each user to have their own blog address (e.g. http://www.domain.com/peter/blog) so got all that working fine.

    The problem:

    When I go to http://www.domain.com/peter/blog I see Peter’s entries and that’s good and all but when I click on the title to read more I get the permalinks page for that blog entry, what I would like to get is http://www.domain.com/peter/blog/hello-world served on the screen and no matter what I try it’s getting that the 3rd segment to show that entry…

    This is my code:

    {if segment_2 =="blog"}
     {exp:channel:entries channel="blog" username="{segment_1}" limit="10" dynamic="no"}
      {title}
     {/exp:channel:entries}
    {if:else}
     {exp:channel:entries channel="blog" username="{segment_1}" limit="1" dynamic="yes"}
      {title}
     {/exp:channel:entries}
    {/if}

    Also tried

    {if segment_2 =="blog"}
     {exp:channel:entries channel="blog" username="{segment_1}" limit="10" dynamic="no"}
      {title}
     {/exp:channel:entries}
    {/if}
    {if segment_2 =="blog" AND segment_3 ==""}
     {exp:channel:entries channel="blog" username="{segment_1}" limit="1" dynamic="yes"}
      {title}
     {/exp:channel:entries}
    {/if}


    I have tried so many different combos to get the 3rd segment to show but nothing shows or I get a blank page.

    I can link the page to http://www.domain.com/blog/hello-world and that works but I wanted to get http://www.domain.com/peter/blog/hello-world.

    I have am running EE 2.5.5

    I hope I made sense, if not please let me know and I will try again,
    I know the code is wrong but if someone can put me on the right track…

    Thank you good people of EE!
    Tony

     

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

ExpressionEngine News!

#eecms, #events, #releases