Get current page wrapper of donation form

Options
My donation forms currently have a redirect to a page within luminate. The url structure looks like: data-success-redirect="PageServer?pagename=donation_thanks&df_id=[[S334:df_id]]" However, my thank you page follows the default page wrapper rather then the wrapper the form is using. I would like the donation form to follow whatever the current donation form is using. I have added pw_id=111 to the redirect url, but I would prefer not to hardcode it. I have tried [[S334:pw_id]] which did not work. I was thinking of trying S120:cart:pageWrapperId to get the current page wrapper ID. Any ideas would be really helpful!
Tagged:

Comments

  • I don't think you can get the wrapper id that way.


    You could store the wrapper id in a session variable, and then read it back later. (Session variables stick with the use during the whole session, unless you overwrite them. https://www.blackbaud.com/support/howto/coveo/luminate-online/Subsystems/S-Tags/S-Tags/S80_Value_of_Session_Variable.html)


    So you could either set it in the URL to the form:


    PageServer?pagename=donation_form&df_id=[[S334:df_id]]&s_pw_id=1234


    Or you could hard-code each wrapper's id right to the wrapper, anywhere above the content:


    [[U0:pw_id=1234]]


    And then read it back later like:


    data-success-redirect="PageServer?pagename=donation_thanks&df_id=[[S334:df_id]]&pw_id=[[S80:pw_id]]


    ​​​​​​​BPM
  • Brian Mucha  I'm new to Luminate -- where would you go about setting this session variable?
  • You can set them in two ways.


    In the URL. A query string parameter with the s_ prefix sets a session variable. For example http://foundation.mydomain.org?s_foo=bar sets a variable called 'foo' and assigns it the value 'bar'. That value will be stored for the duration of the visit.


    On page with an S-Tag. Anywhere on any Luminate page, form, wrapper etc just use the [[U0]] tag. For example [[U0:foo=bar]] sets a variable called 'foo' and assigned it the value 'bar'. That value will be stored for the duration of the visit.


    In either case, you can retrieve the value after it is stored using the [[S80]] tag. For example, [[S80:foo]] will render the text 'bar' for the previous examples.



    So, I suggested you could set a session variable for the desired page wrapper id in the URL to the donation form. That value will then be waiting later in the transaction for inclusion in the ThankYou page URL.


    Or you could just stick [[U0]] at the very top of the html content of every page wrapper in your system. That would essentially create the s-tag you were initially hoping for.



    EDIT: Had S334 when I meant S80. Soz!
  • Another idea. Sounds like you are using the donate API, right?


    One thing I do is put the form and thanks content in the same page, and then redirect right back to the same form with a query string parameter.


    data-success-redirect="PageServer?pagename=donation_form&page=thanks


    Then just wrap your sections in a conditional.


    [[?**[[S334:page]]**::**thanks**::

      <div id="thanks">

        <!--// Thanks content //-->

      </div>

    ::

      <div id="donate">

        <!--// Donation form content //-->

      </div>

    ]]


    This avoids your wrapper problem all together and keeps it nice and contained. You can still have the actual thanks content be a reusable, so you maintain it in one place.


    BPM

Categories