2

Using the pages module, I have a number of entries that load at domain.com/url_title, for example, domain.com/contact

    {exp:channel:entries channel="main" dynamic="on" 
    disable="categories|member_data|pagination|trackbacks" 
    limit="1" url_title="{segment_1}"}
        <h1>{title}</h1>
        {body}      
    {/exp:channel:entries}

Pages display fine. The contact page has a FreeForm form that redirects to domain.com/contact/thank-you, but gives a 404 error. The pages URIs are set correctly. What gives?

2

Adding an additional segment on to the end of a Pages URI will trigger a 404. I recommend using the Freebie extension to set an ignored segment, in your case "thank-you." This will allow you to redirect to /contact/thank-you and show the contact page while still using the second segment for any conditionals.

{if freebie_2 == "thank-you"}
    <p>Your thank you message here.</p>
{/if}
1
  • It's kind of dumb that EE works that way, but the solution is helpful. Thanks Alex.
    – 4midori
    Aug 29 '13 at 18:39
4

When using the Pages module, the URL Title is not used and should not be fed to to the {exp:channel:entries} tag. If you remove that parameter from the tag and change dynamic="yes" or remove the dynamic parameter altogether, it will pick up the correct page entry automatically.

You'll also need to make sure the entry with the Page URI set has the correct template configured on the Pages tab.

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.