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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsSkinsSkinsSite logo without the linkSite logo without the link
New Post
4/4/2013 5:34 AM

In my skin I would like to use the site logo without the link, because I want to add the link to a surrounding div instead of only the logo inside.

Something like this:

<a href='/'><div id='logocontainer'><dnn:LOGO runat="server" id="dnnLOGO" /></div></a>

However, becasue dnn also adds a link, this results in something like this:

<a href='/'><div id='logocontainer'><a id="dnn_dnnLOGO_hypLogo" href="http://..."><img id="dnn_dnnLOGO_imgLogo" src="....png" style="border-width:0px;" /></a></div></a>

A link inside a link is not valid and different browsers even render this completely different, none in the desired way. And as a purist, the styling should be left to the skin/css.

Can I get the logo image tag without the link? (and without the style?) Or should I build my own image tag using <%=PortalSettings.LogoFile%> and <%=PortalSettings.PortalName%> (or PortalAlias?) as the alt-tag?

There's probably a good reason to let dnn generate the link url instead of hardcoding '/'. Can I get that link somehow? Or do I need to construct it myself and which properties should I use for that?

<a href='/'><div id='logocontainer'><a id="dnn_dnnLOGO_hypLogo" title="engelse test" href="http://test1.roland"><img id="dnn_dnnLOGO_imgLogo" src="/Portals/6/logo_vlinder.png" alt="engelse test" style="border-width:0px;" /></a></div></a>

New Post
4/4/2013 6:14 AM

You can build your own logo img tag:

<img src="<%=PortalSettings.HomeDirectory & PortalSettings.LogoFile%>" alt="logo" />

 Link to Home page = NavigateUrl(PortalSettings.HomeTabId)

This and more examples in this free demo skin:


New Post
4/4/2013 7:32 AM

for the image this was the solution :)

However the url isn't the same as dnn generated at all. dnn generated these links for the site logo on veriouw portals (I don't know why they differ):

while NavigateUrl(PortalSettings.HomeTabId) generated these urls:


They bring you to the homepage of the portal, but the link is completely different and definitly not what I want.

I'm not looking for a way to generate a url 'like' the url dnn would generate, I could just as well use '/' instead.
I'm looking for the url dnn generates, generated by dnn, so whatever exception there is where the generated url would differ from '/' (maybe skipping a splash screen? conserving the language or a session id in the url? or maybe there aren't any exceptions possible?), is covered. There must be a reason dnn goes throught the trouble of building a url using the protocol and hostname (and perhaps other elements) instead of simply using '/'. Using my skin should not result in a different url for the site logo link.

New Post
4/4/2013 7:57 AM

Right NavigateURL is old style URLs.
PortalSettings.PortalAlias.HTTPAlias will return the Portal Alias.

New Post
4/4/2013 10:05 AM

Close, but no sigar.

This gives me the hostname, without protocol.
But again: I'm not looking for a way to construct a link like DNN's link, I'm looking for the actual link DNN builds.

e.g. if you would configure [some page x] as the home page of your site, DNN makes the site logo link there. And maybe there are other things which determine the linkt generated. I do not want te rebuild that (unknown) behaviour.

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsSkinsSkinsSite logo without the linkSite logo without the link

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