Solved

Apply a Usemap on Uploaded Logo?

Posted on 2013-05-30
3
209 Views
Last Modified: 2013-06-19
(I'm using the OpenPublic distro)

The logo I uploaded via the Appearance interface actually has two images. By default, the logo links to the site's home page, which is fine, but I want to put a different link on the second image in the logo.

So how do I apply a usemap on the uploaded logo?
0
Comment
Question by:sandshakimi
  • 2
3 Comments
 
LVL 9

Expert Comment

by:scifikillr
ID: 39207858
I think you'd be much better off doing the following instead:

1. Split the logo apart into two images that can either sit side-by-side, or above/below each other.
2. In the page.tpl.php, find the area where the logo is being printed into the page, and modify the code to create a second container for the new image. Then, just style the containers so they are properly aligned. This way, you can easily set a separate URL for the other image, and leave the primary one as the logo, which will automatically link back to home.
0
 

Author Comment

by:sandshakimi
ID: 39208406
scifillr,  

with that approach I would manually upload my images using a relative path, bypassing the Upload option in the Appearance interface ?
0
 
LVL 9

Accepted Solution

by:
scifikillr earned 500 total points
ID: 39210994
You have a few options, but the easiest would be:

Throw the images into your theme, then when you reference the other image from the page.tpl.php, you can either load it as an <img> (with a path to the file that looks like: /sites/all/themes/[theme]/[file]), or you can place it as a background image on the container using CSS (with a path that looks like "images/[file]", if there is an images directory in your theme)

So for instance, if you have a theme called "mytheme" and the image is inside an 'images' directory within the theme, and the file you want is 'logo2.png', then the HTML might look like:

<div class="logo2"><img src="/sites/all/themes/mytheme/images/logo2.png /></div>
OR

<div class="logo2"</div>
With the CSS
.logo2 {
  background-image: images/logo2.png;
  height: [set height];
  width: [set width];
}
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is for those that are having major problems with users upload files such as pictures to their profile. The solution is simple and has to do with correcting the directory paths. With some experimenting and testing i got it fixed. Note…
RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now