Extension

Archived
Forum
(read-only)


For official support, visit the official support site »

Freebie

ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From Rein de Vries

     

Difficulties with ignoring segments

Support (Resolved)

dbigca
dbigca

Hello,

I’m using a single thank-you template for 3 freeform forms.  The template ‘thank-you/index’ is identified in the return variable within the freeform tag and includes specific responses to the form submitted, contained within conditionals set using the freebie variables.

I’m using the following structure within the freeform tag return variable…

Feedback Form -> www.domain.com/thank-you/feedback
Contact Us Form -> www.domain.com/thank-you/contact-us
Quote Request Form -> www.domain.com/thank-you/quote

I have set feedback, contact-us, and quote as freebie segments.

I expect the freebie segments to be absent from the URL, so regardless of the form submitted, the thank-you URL would be…

www.domain.com/thank-you/

which is the desired result, but the freebie segments remain visible in the URL.

What am I doing wrong, or am I misunderstanding Freebie?

Thanks,
Doug

Doug Avery
# 1
Doug Avery

You have it backwards — those segments will still be in the URL, but EE will ignore them. Example: A user visits thank-you/feedback, but EE serves the thank-you/index.html template, because “feedback” is ignored.

dbigca
# 2
dbigca

I see.  It seemed from your examples that the ignored segments were also removed from the URL, but still ‘interpreted’ by EE.

I think I know the answer, but is what I’m looking for at all possible with Freebie?

Thanks,
Doug

Doug Avery
# 3
Doug Avery

I don’t think what you want is possible on the web, unfortunately. The only communication between a user and a server is the URL, so when a user goes to:

www.domain.com/thank-you/

...there’s no way for the server to know “oh, i should show them the feedback page” vs. “oh, i should show them the contact page.” If you want to show three different pages to a user, you will need three different URLs.