Formatting Donation form inside TeamRaiser wrapper

Options
Hello!


I am trying to format a donation form inside a pre-existing TeamRaiser page wrapper. All I need to do is call in a CSS file, but the code I am using doesn't seem to be working.


Here is what I tried: 


[[?x[[S8]]::Donation2::T::



<!---Embedded CSS-->


]]


I'd like to keep everything in one place so that if we choose to use this wrapper again that all styles will remain consistent throughout. I could just call this CSS into the form itself, but in the long run it's just one extra step in the process. 


All thoughts and suggestions appriciated! :) 
Tagged:

Comments

  • Hi Andrea,


    Your S-tag conditional has an orphaned 'x' on that as well as missing the colon colon in between to represent the 'else' which likely would be the cause why it won't work.  Normally if you do and if else conditional, if you use wrapping 'x', you have to have the opening and closing 'x' wrapping your statement, and  don't forget you still need to put that ::  just before the closing ]]    you actually misplaced the stylesheet -- it should be replacing that T  because that's the place you want to put your CSS when it's TRUE (and you don't need the T there)


    Regardless, but I think you would fare better by using  [[S4]]  tag and checking the page type value of a donation which value is usually 9  instead of trying to find an occurence 'Donation2' within the URL as you attempted to do with that S8 tag.


    With that said, you could put this on your pagewrapper

    [[?xx9xx::xx[[S4]]xx::

      <!-- this is donation page, put the css here -->

     <style>

      /* your CSS stylesheet */

    </style>
    ::]]



    regards,

    Daniel


    Andrea Ritterbeck:

    Hello!


    I am trying to format a donation form inside a pre-existing TeamRaiser page wrapper. All I need to do is call in a CSS file, but the code I am using doesn't seem to be working.


    Here is what I tried: 


    [[?x[[S8]]::Donation2::T::



    <!---Embedded CSS-->


    ]]


    I'd like to keep everything in one place so that if we choose to use this wrapper again that all styles will remain consistent throughout. I could just call this CSS into the form itself, but in the long run it's just one extra step in the process. 


    All thoughts and suggestions appriciated! :) 

     

  • Daniel Hartanto:

    Hi Andrea,


    Your S-tag conditional has an orphaned 'x' on that as well as missing the colon colon in between to represent the 'else' which likely would be the cause why it won't work.  Normally if you do and if else conditional, if you use wrapping 'x', you have to have the opening and closing 'x' wrapping your statement, and  don't forget you still need to put that ::  just before the closing ]]    you actually misplaced the stylesheet -- it should be replacing that T  because that's the place you want to put your CSS when it's TRUE (and you don't need the T there)


    Regardless, but I think you would fare better by using  [[S4]]  tag and checking the page type value of a donation which value is usually 9  instead of trying to find an occurence 'Donation2' within the URL as you attempted to do with that S8 tag.


    With that said, you could put this on your pagewrapper

    [[?xx9xx::xx[[S4]]xx::

      <!-- this is donation page, put the css here -->

     <style>

      /* your CSS stylesheet */

    </style>
    ::]]



    regards,

    Daniel


    Andrea Ritterbeck:

    Hello!


    I am trying to format a donation form inside a pre-existing TeamRaiser page wrapper. All I need to do is call in a CSS file, but the code I am using doesn't seem to be working.


    Here is what I tried: 


    [[?x[[S8]]::Donation2::T::



    <!---Embedded CSS-->


    ]]


    I'd like to keep everything in one place so that if we choose to use this wrapper again that all styles will remain consistent throughout. I could just call this CSS into the form itself, but in the long run it's just one extra step in the process. 


    All thoughts and suggestions appriciated! :) 

     

     

    Thanks for the quick feedback, Daniel!


    I was able to locate the current CSS file of the form and switch it to the one I created by using the S8 tag. (Code below)


    [[?[[S8]]::Donation2::[[S51:MYCSSFILE]] 


    However, I'm still curious about the S4 tag. How are page type values calculated? I've saved your code in case I may need it in the future, but am curious about the different page types and values in case I may need this for a page type other than a donation form.. 


    Thanks so much for your help! 

  • Hi Andrea,


    Page Type value is not calculated, but there are specific assigned IDs for different types of Luminate Online pages. The complete list is available here:

    https://www.blackbaud.com/files/support/helpfiles/luminate-online/help/luminateonline.html#../Subsystems/S-Tags/Content/S-Tags/S4_S11_Application_IDs.html?Highlight=S4​


    Or if you are unsure what type of page is that, normally what I would do is that I would have a hidden <DIV> tag where I simply put the [[S4]] within and I put that hidden DIV on the pagewrapper, thus anytime I need to know what value is the page I am currently on I could simply do "view source" on that browser and locate my hidden DIV to see what value that div holds currently (give ID to your hidden div so you could easily locate them using the "find" when viewing the source.  Similar like this below:


    <div id="mydebugbox" style="display:none;">

    [[S4]]

    </div>


    Put that on your pagewrapper  so that you don't have to manually put it on every page it needs be.


    And last but not least, you could also embed another reusable pagebuilder (through that S51 tag) within the S4 conditional just like you did with that latest S8 snippet on your second post.


    regards,

    Daniel

     

    Andrea Ritterbeck:

    Daniel Hartanto:

    Hi Andrea,


    Your S-tag conditional has an orphaned 'x' on that as well as missing the colon colon in between to represent the 'else' which likely would be the cause why it won't work.  Normally if you do and if else conditional, if you use wrapping 'x', you have to have the opening and closing 'x' wrapping your statement, and  don't forget you still need to put that ::  just before the closing ]]    you actually misplaced the stylesheet -- it should be replacing that T  because that's the place you want to put your CSS when it's TRUE (and you don't need the T there)


    Regardless, but I think you would fare better by using  [[S4]]  tag and checking the page type value of a donation which value is usually 9  instead of trying to find an occurence 'Donation2' within the URL as you attempted to do with that S8 tag.


    With that said, you could put this on your pagewrapper

    [[?xx9xx::xx[[S4]]xx::

      <!-- this is donation page, put the css here -->

     <style>

      /* your CSS stylesheet */

    </style>
    ::]]



    regards,

    Daniel


    Andrea Ritterbeck:

    Hello!


    I am trying to format a donation form inside a pre-existing TeamRaiser page wrapper. All I need to do is call in a CSS file, but the code I am using doesn't seem to be working.


    Here is what I tried: 


    [[?x[[S8]]::Donation2::T::



    <!---Embedded CSS-->


    ]]


    I'd like to keep everything in one place so that if we choose to use this wrapper again that all styles will remain consistent throughout. I could just call this CSS into the form itself, but in the long run it's just one extra step in the process. 


    All thoughts and suggestions appriciated! :) 

     

     

    Thanks for the quick feedback, Daniel!


    I was able to locate the current CSS file of the form and switch it to the one I created by using the S8 tag. (Code below)


    [[?[[S8]]::Donation2::[[S51:MYCSSFILE]] 


    However, I'm still curious about the S4 tag. How are page type values calculated? I've saved your code in case I may need it in the future, but am curious about the different page types and values in case I may need this for a page type other than a donation form.. 


    Thanks so much for your help! 

     

     

Categories