$logo support
fm - October 4, 2008 - 23:00
| Project: | Blueprint |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Description
Will Blueprint 6.x-1.x-dev display site logo?
I configured the admin. settings to display a logo, but it won't show up. So I looked at the Blueprint files and can't find any support for this common feature.

#1
You are correct. Currently the $logo variable is not included in the php. That attached patch will do it. However if there is no logo.png file in the theme folder, it will give either a broken image icon or just display the alt text (Firefox).
@m3avrck: Should we just add a logo.png of the Drupal logo to the package?
#2
The first hunk fails ... apparently it is trying to modify part of the code that has already changed.
Second hunk patches successfully. It would be nice to see this code make it into the official release.
#3
The first hunk shouldn't have been there. Here is an updated version.
#4
On further though, I am going to mark this a 'By Design'.
The preferred way to add a logo to the design is to do it in the CSS was a background image. An example of the way I typically do it is as follows:
h1 a{
width: [width of logo];
height: [height of logo];
display:block;
text-indent: -99999em;
background: url(images/logo.png) no-repeat left top;
}
What this ends up doing is removing the text title of the site, and replacing it with a background image of the logo that is still linked to the homepage of the site.
Hope that helps.
Brent
#5
Thanks Brent, this just answered a question I had as well.
Note for others: the URL path to the logo in the CSS to images might also be ../images/logo.png - at least that's what it was in my case.
Otosi
#6
I hate to re-open a "by design" issue, but I don't believe #4 to be accurate.
According to Matt Cutts, head of Google's Webspam and Search Quality team, the preferred way is to add the logo as an image in the HTML and use the alt attribute to store the logo text. He specifically, and exacerbatingly, rejects the text-indent/CSS method in one of his Q&A videos: http://www.youtube.com/watch?v=fBLvn_WkDJ4
If Google strongly recommends not using CSS techniques for displaying the logo, it could adversely affect those who implement the blueprint theme according to the documentation.
#7
I think mark has a good point in #6. The 'CSS image replacement' is working against the standard Drupal theme code that inserts the image as html. It basically breaks the core logo feature. A CSS logo also won't be printed, unlike an inline html image.
#8
I agree with Mark and Drew in #6 and #7 respectively. While I have implemented Brent's recommendation from #4, it has complicated updates and multisite management. I would prefer a solution that conformed to the Drupal system and didn't require me to customize code every time I updated this theme.
#9
If the 'correct way' is via CSS as used in #4 then surely the module should be performing a drupal_add_css() rule that dynamically adds the logo path to the logo assigned in the Drupal theme settings. This would mean that the standard way to assign the logo in admin/build/themes/settings still isn't broken by this theme. I don't really think this is the way to get the original functionality back.
I personally think it should just be printed in the page.tpl. CSS best practice is changing constantly and is often a philosophical argument, eg should you use text-indent:-99999px; or display:none to hide.
If people are using this theme you can assume they have some desire to do additional theming via CSS as required, so they can take the logo out if required.
@fm if you are creating a subtheme you don't need to worry about this issue, you have your own copy of the page.tpl to print whatever you need, so upgrading the theme is fine.
#10
Ok... I just watched the Matt Cutts video for the first time and can see that my current method of site building may be a bit out-dated. (How in the world does that happen?!)
@fm: Sub-themes are certainly the way to go on updates. I do realize that in the past that was much harder, However with the release of the 1.3 version of the theme, that should be better and the subtheme function names shouldn't clash as before.
One possibility is to enable the upload form and add a radio button to select the method for logo inclusion? (Inline image tag vs. CSS) The real problem with the CSS method is that to do it in code we will have to generate the css code inline on each page, thereby negating the gains of actually using CSS code in once place.
The other option would be to just enable it in the subtheme.
I'll be working soon to add more options to the base theme and then to actually publish a sample starter theme that you can customize to your needs. That way when the actual Blueprint theme is updated, your sub-theme won't have to change much.
#11
subscribe
#12
I'm moving this into the 2.x line as this is something that will be addressed soon.
#13
This has now been committed to the 2.x branch: http://drupal.org/cvs?commit=299338
#14