2

I have a template group called "about-us" and within that group are 2 types of templates, one is called "about-content" and the other is called "where-and-when". I've noticed when I navigate to the page it displays this url "...about-us/about-content/where-and-when". But where I actually want the url to point is "about-us/where-and-when". I'm doing something wrong, and I can't figure out what it is. Its probably super simple and I'm going to feel like an idiot when you tell me the answer;)

here's my code:

{exp:channel:entries channel="content" disable="categories|member_data|pagination"     url_title_path="where-and-when"}
        <h2 class="section-header">{title}</h2>
        <p>{page_content}</p>
        <img src="{image}" alt="Franklin Vineyard Church" title="Franklin Vineyard Church"/>
        <p>{snp_when}</p>
        {snp_location}

{/exp:channel:entries}

I also have this code that displays links in the sidebar to other entries. I'm thinking this may be the problem, because I'm clicking the link in this div to get to the "where-and-when" page.

<h2 class="section-header">About Us</h2>
        {exp:channel:entries channel="content" dynamic="off"}
        {if url_title != last_segment}<li><a href="{title_permalink="about-us/about-content"}">{title}</a></li>{/if}
        {/exp:channel:entries}
2

If you're looking to have a URL structure of domain.com/about-us/where-and-when your sidebar would then need to have "about-content" removed as a segment. That should be all you need to change to have the links establish the URL structure you're looking for.

| improve this answer | |
  • That fixed it. I had tried that previously, but only removed that bit of code from the sidebar on 1 of the 2 templates in that template group. Once I removed it from both, it works fine. thank you! – hyphen81 Jan 4 '13 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.