Advice - how to add custom button to website

callasabra - September 7, 2009 - 15:40

I have create an image that I intend to use as a "Get a Quote button" that will basically link to another page (ie content/quote). I would like the "button" to appear on the right side of every page of the site. My theme is pwc016_business.

How do you recommend I accomplish this task? When I do it as a block the "button" part works fine but I also get a "box" much like the box of links on the left (My account, Create Content, Administer, etc) labeled admin.

The best example of what I am trying to do can be found here http://allianceindc.com/ (notice the "get a quote button" on the right).

I appreciate any advice and help. Thanks.

I think using a block is a

nevets - September 7, 2009 - 15:45

I think using a block is a good way to approach it. It just sounds like you need to apply some css. If you use the Firefox extension firebug you can find the block id (all blocks have an id) as well as the css that adds the unwanted styling. You can then add css that overrides the unwanted styling.

block theme

ytin - September 7, 2009 - 15:55

You can theme the specific block separately by using the block theme in this format block-modulename-delta.tpl.php. Since you are manually creating the block you should use "block-block-delta.php " to find the delta use the devel module.

Alternatively, you can try to use the "block theme" module http://drupal.org/project/blocktheme

HTH

firebug shows that the

callasabra - September 7, 2009 - 16:27

firebug shows that the following code:

<div id="user2">
<div class="Block">
<div class="Block-tl"/>
<div class="Block-tr"/>
<div class="Block-bl"/>
<div class="Block-br"/>
<div class="Block-tc"/>
<div class="Block-bc"/>
<div class="Block-cl"/>
<div class="Block-cr"/>
<div class="Block-cc"/>
<div class="Block-body">
<div class="BlockContent">
<div class="BlockContent-body">
<p>
<span class="inline inline-right">
<a href="/drupal1/content/quote">
</a>
</span>
</p>
</div>
</div>
</div>
</div>

where "<div class="BlockContent-body">" is the unwanted box.

However, I cannot find this specific snippet of code in any of my pages that is specific only to the "user2" block which I have chosen for the button. I don't want to delete the code because I fear it is used elsewhere (ie my admin box).

where is firebug finding this code because I do not see it in page.tpl.php. the most similar code I have found is in block.tpl.php.

I appreciate your help

See the comment from ytin,

nevets - September 7, 2009 - 16:30

See the comment from ytin, you probably want to follow the first approach they suggest and used a simplified version of block.tpl.php for your block.

Thanks for the help guys, the

callasabra - September 8, 2009 - 10:25

Thanks for the help guys, the blocktheme module did the trick. That is an amazing module.

 
 

Drupal is a registered trademark of Dries Buytaert.