CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • How to hide certain things on contribution page
Pages: [1]

Author Topic: How to hide certain things on contribution page  (Read 1306 times)

ToddFur

  • I post occasionally
  • **
  • Posts: 52
  • Karma: 0
How to hide certain things on contribution page
October 16, 2008, 08:44:38 am
I have the on-line donation page up and running. Works great -- collects all data and processes the payment. However there are some things on the form I don't want contributors to see

1) I don't want the "ben's bells database" header to be showing at all..... and I also don't want the login on the left column.

2) I pretty much just want the form in the white area to appear as stand-alone URL form. How can I do this?

(http://www.bensbells.org/screenshot.bmp)


emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: How to hide certain things on contribution page
October 16, 2008, 10:21:39 am
This is more a drupal thing / plain old website thing. You can easily enough remove the login block at <yoursite>/admin/build/block

but removing the Ben's Bells Database header area is a bit more complicated and you will have to get into a little code. You have 2 options:

1. You'd have to edit your page.tpl.php file in your drupal theme to not show any regions other than the content region but only on THIS page (you'd need to write some php if statements). If you want to get into this, you should probably start checking out drupal theming: http://drupal.org/node/11774

2. You can leave drupal completely and just make a php page that has nothing to do with Drupal. You would paste the standalone code into this page. The trick here is that you'd have to use civicrm's api to tell your page where civicrm is, etc. To learn how to do this you'll want to read up here: http://wiki.civicrm.org/confluence/display/CRMDOC/Using+CiviCRM+APIs+-+Code+Snippets

Given, there are probably other ways you can accomplish this, but off the top of my head those are the 2 I would probably suggest.

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: How to hide certain things on contribution page
October 16, 2008, 12:58:16 pm
Your screenshot is a Drupal generated page at a */civicrm/* path.

There are a few contributed modules that will apply a different theme according to the drupal path. I think this one will work for you (but I have not tested):
http://drupal.org/project/sections

Set the module up to apply a theme you like (without the header and such) with block settings you like (no login block) on the civicrm/* paths.

I suspect that will let you accomplish your goals.
Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: How to hide certain things on contribution page
October 16, 2008, 01:05:42 pm
righto geilhufe, knew i forgot to mention some options

you can also use taxonomy theme: http://drupal.org/project/taxonomy_theme

Then you would just enable another theme on your site. if you install taxo theme, you can apply a theme to a specific path (so the exact page url).

I don't know about the sections module; that might make it even easier as geilhufe suggests, but if you go with taxo theme and most other options, you might still need to adjust some stuff in your page.tpl.php file. So if you apply a new theme to that path, an easy way to do it is to open the page.tpl.php file for that new theme, and then you can basically just put this between the
Code: [Select]
<body> tags to only print the node content:

Code: [Select]

<?php
print $content;

print 
$closure;
 

?>


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • How to hide certain things on contribution page

This forum was archived on 2017-11-26.