Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Apply a Usemap on Uploaded Logo?

Posted on 2013-05-30
3
Medium Priority
?
221 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 1500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

885 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