Drupal 7 site:
We need to add data to certain donation pages. For instance, it should appear on id=1 but not on id=2. This includes some code and js.
I made a Main.extra.tpl and everything works fine when it appears on all pages, but I have not been able to restrict it to be included only on page id=1.
I read that you can do: {if $contributionPageId == "yourPageId"} Your custom messaging here {/if}
but wrapping my code in
{if $contributionPageId == "1"} {/if}
doesn't work.
Is there a better way to do this?
Thanks, Rachel
Edit: For now I've modified Drupal's page.tpl.php with:
if ((arg(0) == 'civicrm' && arg(1) == 'contribute') && ($_GET['id'] == '1')):
which does the job - but I still believe there must be a better way.