4

I have a contribution page that uses values passed via URL to track specific information about the source of the contribution.

www.domain.org/civicrm/contribute/transact?reset=1&id=8&campaign=sponsorship&appeal=11&fund=child&amount=35.00

The appeal variable in the URL contains the nid (node id) for Drupal content. I would like to display image, first_name, and description of the child, pulled from this node.

Would a profile be used here or use the code extension created for tracking the source?

2
  • When you say "node" you mean a Drupal node?
    – Coleman
    Commented May 29, 2015 at 2:22
  • Yes, sorry. The node content type called sponsorship. it contains information about a person, place, or thing that can be sponsored.
    – mike_kc
    Commented May 29, 2015 at 2:53

1 Answer 1

2

One way (if I understand correctly what you are after) would be to create a view that displays the node (or node's fields -- image, first_name, description) as you want it using a Block display for the view. Set up a contextual argument for the node's nid which provides a default value using PHP code and pull the appeal variable from the URL, something like this:

check_plain($_GET['appeal');

Then simply display this block at the top of the content region in your default theme for the civicrm/contribute/transact path.

1
  • 1
    If your contextual filter drop down list for "Provide default value " does not contain "PHP Code" you will need to go to the modules and enable "PHP filter"
    – mike_kc
    Commented Jun 2, 2015 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.