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...Administration ...Administration ...How to do (if ACTIVE-PAGE == "home") do thisHow to do (if ACTIVE-PAGE == "home") do this
Previous
 
Next
New Post
5/8/2009 4:04 PM
 

Hi!

I've got a question again.

In my template, menu items aren't child of "home" item, but I'd like to have "Home" link to appear at the beginning on the breadcrumb when the active page isn't Home.

I can add "Home" with the link directly in the template, but it will show also on the Home page. Is there a way to write something like that (in ASP)

If ($active_page != "home") {

      echo "<a href=\"#\">Home</a>";

}

it's in PHP but i'm sure you get what I mean

Thanks in advance

 
New Post
5/9/2009 10:25 AM
 

This feature is actually built-in to the core, granted you need to toggle some of the default settings on the breadcrumbs control. It's alot easier than the core modification I was just writting as a sample.

Anyways, you'll want to modify your active skin, and add something like this into the file...


<script runat="server" language="VB">
    Private Sub skinpageload(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If DotNetNuke.Common.GetPortalSettings.ActiveTab.TabID = DotNetNuke.Common.GetPortalSettings.HomeTabId Then
            dnnBREADCRUMB.RootLevel = "0"
        Else
            dnnBREADCRUMB.RootLevel = "-1"
        End If
    End Sub
</script>


The text "Root" will be used by default from the Localization file, you can override this setting to change the name of the home page through the Host > Languages module.

 
New Post
5/12/2009 11:56 AM
 

Hi, thanks for your kind reply

I can't find "root" string in host > language ... do you know where exactly it is ?

 

thx ;)

 
New Post
5/12/2009 12:11 PM
 

guy labbé wrote

I can't find "root" string in host > language ... do you know where exactly it is ?

It's hidden deep, took me a second to find the exact path... 

Host > Languages > Edit Default Language > Edit Language Files > Local Resources > admin > Skins > App_LocalResources > BreadCrumb.ascx

After all those clicks, Root.Text is the only item in the file 

 
New Post
5/13/2009 9:45 AM
 

1000 times thanks! I wouldn't be able to find this by myself ... i wish you a wonderful day  :P

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to do (if ACTIVE-PAGE == "home") do thisHow to do (if ACTIVE-PAGE == "home") do this


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