More in this section

Forums / Developing with Sitefinity / Breadcrumb only showing Current Node

Breadcrumb only showing Current Node

10 posts, 0 answered
  1. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    11 Dec 2009
    Link to this post
    I've added the Breadcumb control to my template page.  When I look at the page in design move it shows:

    Parent Node > Current Node (see image attatched)

    When I run the application, it only shows the Current node.  For example, when I drill down on my blog page to go to the postings and comments.  It still just  shows 'Blog'.  I would think it would show the following:

    Home > Blog > Blog Post > Post Comment (see image attatched)

    I've tried playing around with different settings to make it show, but it's not showing the parent nodes.  I don't have a site map provider.  Trying to find a document on what all needs to be set.

    Thanks,

    R
  2. Ray
    Ray avatar
    15 posts
    Registered:
    09 Jul 2008
    11 Dec 2009
    Link to this post
    Hey Randy,
    To make the breadcrumb control show more then the current node make sure the ParentLevelsDisplayed Property is set to -1. That will make sure that it will show all parent pages of that specific page. The breadcrumb control actually pulls from the Sitefinity sitemap so you'll also need to make sure that your blog pages are setup in a parent child hierarchy.
    To get the hierarchy that you want you'll need to have a single page to show the blog list then make a child page which has the detail view of the blog. You'll need to set the "Explict Links> SingleItemUrl" property of the blog list page to the page of your blog detail item page. The control for lists and details is the same, it's just the behavior property of the control that makes the difference.
    This is the way I have gone about doing things with my sites, I attached some images of some of the things I was talking about. Hope this helps.

    -Ray
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 Dec 2009
    Link to this post
    Hello Randy,

     You can set hideUrlServiceNodes property to true, so that all dynamic links generated by ContentView controls (NewsView, BlogPosts, EventsView etc) will be shown in the breadcrumb contorol

    <siteMap defaultProvider="CmsSiteMapProvider" enabled="true">
                <providers>
                    <clear/>
                    <add name="CmsSiteMapProvider" hideUrlServiceNodes="false" description="Displays Cms Pages" type="Telerik.Cms.Web.CmsSiteMapProvider"/>
                </providers>
    </siteMap>

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    14 Dec 2009
    Link to this post
    Hello,

    I made that change and I still do not see the child nodes.  Do I need to set something else?

            <siteMap defaultProvider="CmsSiteMapProvider" enabled="true">  
                <providers> 
                    <clear/> 
                    <add name="CmsSiteMapProvider" hideUrlServiceNodes="True" description="Displays Cms Pages" type="Telerik.Cms.Web.CmsSiteMapProvider"/>  
                </providers> 
            </siteMap> 

    Thanks,

    Randy
  5. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    14 Dec 2009
    Link to this post
    Hi Ray,

    Thanks for your help.  I am looking into this.  Telerik also submitted a simple change that I tried, but that hasn't worked.  I'll wait to hear more back from them.

    Thanks,

    Randy
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 Dec 2009
    Link to this post
    Hi Randy Bauer,

    Actually the property should be set to false as posted  hideUrlServiceNodes="false" . So the result will be as the attached image shows.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    14 Dec 2009
    Link to this post
    Hi Ivan,

    I set it to false and it works for the blog, but not the forums.  What do I need to do to make it work for the forums?  I see that the forums url has forums.aspx, even when I drill down.  I am using the Forum Control within CMS.

    Thanks,

    Randy
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 Dec 2009
    Link to this post
    Hi Randy Bauer,

    The SiteMapProvider property works for ContentView based controls. Forums module and its controls are not based on GenericContent implementation. There is a way to achieve this requirement. Below are the steps.

    1. Create a custom control that derives from Forums.

    2. Override CreateAllForums

    3. Subscribe for

    cntAllForums.Uncategorized.RowCommand += new GridViewCommandEventHandler(ForumsGrid_RowCommand);


    4. Add the following logic to the RowCommand event

    void ForumsGrid_RowCommand(object sender, GridViewCommandEventArgs e)
            {
                switch (e.CommandName)
                {
                     // HERE GET THE THREAD NAME AND APPEND IT AS A QUERY STRING.
                    case "OpenForum":
                            HttpContext.Current.Response.Redirect(this.singleForumPage + "?mode=singleForum&forum=" + this.selectedForumID.ToString());
                        base.ChildControlsCreated = false;
                        break;
                    case "OpenThread":
                            HttpContext.Current.Response.Redirect(this.singleThreadPage + "?mode=singleThread&thread=" + this.selectedThreadID.ToString());
                        base.ChildControlsCreated = false;
                        break;
                }
            }

    5. Create a custom control that derives from Breadcrumb.

    6. Override Initialize controls

    7. Check the Request.QueryString and look for the key that you should add to specify the current thread (step 4)

    8. Get the value and create a new "fake" item - you can use a LiteralControl.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    14 Dec 2009
    Link to this post
    Hi Ivan,

    This is way over my head, but I am willing to learn.  Is there some documentation or videos on some of these details?  I've been looking for documentation on this and on how to create my own forum workflow and layout.

    Thanks,

    -R
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 Dec 2009
    Link to this post
    Hello Randy Bauer,

    Unfortunately there is no other documentation for this that our Developer manual.


    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
10 posts, 0 answered