Determine whether current page is donation form or thank you page

Options

I've asked this before I think, but I couldn't locate the answer...  How can I dynamically render content in a PageWrapper depending on whether the current page is a donation FORM or that form's Thank You page?

I'd rather not use JavaScript because I want to be certian it's rendered correctly, but I can't seem to make it work using Stags.  Here's what I've tried so far:

]]]

].donation]]

]]]]]

-->  THIS ONLY RENDERS "]]" and therefore doesn't actually work.....  I've tried some variations but I can't get it to actually render the value of that param.  It's REALLY annoying that this parameter key, not just the value, is different on every form.



<p>THIS_FORM_ID: ]</p>

<p>THIS_STEP_PARAM: ]</p>

<p>THIS_STEP: ]</p>  --> Always renders ]] rather than "form1" or "completed" or whatever.

]xx::xxcompletedxx::

<!-- STUFF FOR THANK YOU PAGE -->

::

<!-- STUFF FOR FORM PAGE -->

]]

(note, this wrapper is exclusive for a particular donation campaign, which are all one-step donation forms without splash pages -- it's OK for this to be a little limited that way).

Thanks!-mike

Tagged:

Comments

  • Michael,

    Try this:



    ].donation]]x::
    <!--URL doesn't contain query string, don't do anything-->
    ::
    <!--URL does contain query string, put it into a session variable-->
    ].donation]]]]
    ]]

    The reason for checking if the query string exists is that there are occasions where it does not (for example, if there is an error). If it does not, you don't want to null out your session variable.

  • Noah Cooper:

    Michael,

    Try this:



    ].donation]]x::
    <!--URL doesn't contain query string, don't do anything-->
    ::
    <!--URL does contain query string, put it into a session variable-->
    ].donation]]]]
    ]]

    The reason for checking if the query string exists is that there are occasions where it does not (for example, if there is an error). If it does not, you don't want to null out your session variable.

    Awesome, works great.  |..|,

    Still wish there was a nice, simple way to know in the page wrapper what page in a donation process a user is on without having to parse session and querystring variables....

Categories