Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Header Tag / Logo Replacement - Opinions?Header Tag / Logo Replacement - Opinions?
Previous
 
Next
New Post
8/6/2009 8:04 PM
 

Now, this is probably old-hat for many of you, I myself have toyed with these things for years before DNN, but I've been a bit slow to bring them in to my skins, as I've been gettting a feel for DNN's idiosyncracies when it comes to the rendered source, page and default CSS.  So recently, I've been working on trying to integrate better semantic markup into my skins and containers. Particularly so it happens 'automatically' as the less-technical editors make changes. One hangup I kept coming across was - How to integrate H1 tags into a page without disrupting the graphic design. I'd used the Logo element for a while, but I recently read in another thread that the way it links back may cause issues with SEO.

After toying around with my old snippet library and reading around, I came across the following technique and I'd like to get some feedback as to anything I may be overlooking. Simply, where I would normally have a LOGO element, I've replaced it with a H1 tag, then used some CSS to lay an image over top, example:

HTML

<h1 class="SiteTitle">
<span onclick="location.href='/default.aspx';" style="cursor:pointer;"></span>This is the Site Title
</h1>

CSS

h1.SiteTitle {
	width: 990px; 
	height: 68px;
	position: relative;
	padding:0;
	margin:0;
}
h1.SiteTitle span {
	background: url("Company-Logo.jpg");
	position: absolute;
	width: 100%;
	height: 100%;
}

The onclick command is there to provide the standard home click-back, other than that it's all fairly basic. Any thoughts or comments on aspects I may be missing?

Thanks!


Wells Doty Jr
Online Content Development
 
New Post
8/6/2009 8:21 PM
 

I would include the logo as an image;

1. If people Google for Images, a CSS image will not be found AFAIK.

2. If people print the page (with the browsers print, not the print Skin object) there is a good change the CSS backgroundimages will be lest out also, hich is not good for the logo IMO

Also; are you trying to hide the link to the home page from Google, or waht is the reason you don't use a regular link?

BTW, I would not use /default.aspx, but <%="http://" & PortalSettings.PortalAlias.HTTPAlias%> that is the real "Root" link.

Did you know you can do this with the TEXT skin object too BTW?

HTH, Timo

 
New Post
8/7/2009 12:54 PM
 

Hey Timo, thanks for the feedback.

I'm not trying to hide the link per se, however I had read in one of these forums about the use of the LOGO object being semi-detrimental to the SEO of more business-oriented sites. I'm trying to find the post, as it was from one of the more active community members/developers. I believe it had to do with the formatting of the link in the LOGO object. Once I find the post, I will link it here (the forum search here is not my friend apparently)

I'm having to implement the method I mentioned above in order to meet the requirements of some SEO consultants I'm having to work with on several projects. They are big on insisting that each page needs to be semantically marked up using the H1 tag once per page (site title), H2 for page titles, and H3 for categories / container titles (I'm still trying to find a good way to squeeze in H2s, thinking about the breadcrumb nav).

The problem being that there's no great way to jam in the raw text of "Jimmy's Fishstick Emporium - Anytown, USA" into the design. However, I figured that the header of the page could be used but those are usually non-crawlable images. So I've been playing with sIFR a bit, which is great for using fancy fonts but some of my designs have more than a fancy font in the header and I'm still not completely keen on implementing sIFR into production sites as I have to edit source files to get it working, and that can cause headaches come upgrade time.

So, as I went back through my book-o-tricks from my pre-DNN days, I recalled the image replacement techniques I had read about on AListApart.com. Unfortunately, the highlighted technique there has been debunked as not being screen-reader friendly, and possibly damaging to SEO. A bit more reading brought me to this article. I figured #8 was the best fit and went about deploying it on a devlopment site (www.jetrentatv.com/default.aspx). The only problem I ran into was how to replicate the homepage click-back that is often implemented in the header/logo section. For this, I resorted to javascript in the OnClick command (still have to test that for site indexing)... however while writing this it occurs to me that I may be able to wrap the H1/Span in an A element.

What I've found so far is:

  • Image renders correctly in IE7 and 8, FF 3.5.1, Opera 9.64 (haven't passed it through BrowserCam / BrowserShots for the full littany yet)
  • with CSS disabled (Firefox Web Developer Toolbar), the text displays.
  • When passed through SEO-Browser.com, the H1 text is read and displayed.
  • W3C Semantic Extractor - Awaiting results, as I'm still ironing out some markup issues with my containers that are causing it fits
  • W3C Validator - Oy, what a mess DNNNav creates (and some sloppy tags I still need to clean up), but no errors on the header elements.

Wells Doty Jr
Online Content Development
 
New Post
8/8/2009 10:20 AM
 

Hi Wells

I use the same technique for my client-specific production sites...

I use an H1 to give a semantic Heading to the site - W3C and common concensus recommends that only 1 <h1> be used per page, as this is the primary heading for the webpage.

I then assign a class to the h1 to display exactly as I want it to - with a block display and background image sprite, like so:

HTML:

<h1 class="logo"><a title="My Website - Home" href="http://www.domainname.com"><span>Decent Semantic SEO Title</span></a></h1>

CSS:

.logo {
    margin: 0px;
    padding: 0px;
    float: left;
}
.logo a {
    display: block;
    width: 300px;
    height: 60px;
    background-image: url('images/logo.gif');
    background-position: center bottom;
    background-repeat: no-repeat;
}
.logo a:hover {
    background-position: center top;
/*This moves the sprite to give hover effect*/
}
.logo span {
    display: none;
}

From what I understand here, you might be able to get away with something like this...

<h1 class="logo"><a title="My Website - Home" href="http://" & PortalSettings.PortalAlias.HTTPAlias"><span>Decent Semantic SEO Title</span></a></h1>

...but I actually need some help with this one too...  I would like the <a title=""> to use a DNN reference to display the "PortalSettings.PortalAlias.HTTPAlias" and the <span>PortalSettings.PortalAlias.HTTPAlias<span> to do the same...  Is this possible..?

Jon


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
8/8/2009 10:56 AM
 

Jon, you should not forget the <%...%> if you use PortalSettings.PortalAlias.HTTPAlias (in an ASCX skin).

Yes you can use most of the frameworks attributes like that.

Examples:

<h1 class="logo"><a title="<%= PortalSettings.PortalAlias.HTTPAlias%>" href="http://<%= PortalSettings.PortalAlias.HTTPAlias%>"><span>Show Portal Alias</span></a></h1>

<h1 class="logo"><a title="<%= PortalSettings.Description%>" href="http://<%= PortalSettings.PortalAlias.HTTPAlias%>"><span>Use PortalDescription for Link Title</span></a></h1>

<h1 class="logo"><a title="<%= PortalSettings.PortalAlias.HTTPAlias%>" href="http://<%= PortalSettings.PortalAlias.HTTPAlias%>"><span><%=PortalSettings.PortalName%></span></a></h1>

BTW, some of this can be done with the TEXT skin object too.. but not the classes since the TEXT skin object renders it's content in a span

HTH

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Header Tag / Logo Replacement - Opinions?Header Tag / Logo Replacement - Opinions?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out