2B9A75E094B1481CA4C981324462D53F
  • Internet
  • 06.12.2017
  • EN

Simply RedDot: "Breadcrumb: RenderTag Vs Placeholder"

written by Jian Huang, 5. March 2012
 

Generally, there are two ways to generate a breadcrumb
 

Method #1: RenderTag

<%!! Navigation:OutputArea(Breadcrumb) !!%>

 

Method #2: Placeholder

<!IoRangeBreadCrumb><%anc_breadcrumb%> &raquo; <!/IoRangeBreadCrumb> <%hdl_title%>

Instead of using rendertag, it is best practice to use native placeholder to generate the breadcrumb for the following reasons:

  1. When using rendertag to generate breadcrumb, the page must be in navigation structure.  For performance reasons, it is unwise to have a page in navigation structure for the sole purpose having a breadcrumb because this will not scale for sites with 200+ pages.  Large navigation structure = slow project.
  2. Hiding a page from breadcumb requires additional rendertag logic, which is another performance cost.  Whereas using breacrumb placeholder, simply select page, click "edit properties", and enable "Do not use for breadcrumb"

Comments

Hilmar March 7, 2012 at 7:52 AM
I like the RenderTag solution more because in most projects there is a function "Do not show in display" or something similar. If you use the placeholder instead of the RenderTag solution, you will have to set that option plus "Do not use for breadcrumb".

However, if you have a simple project that doesn't need that function it could be a good idea to use the placeholder solution.

Hilmar Bunjes
http://www.erminas.de

Jian Huang March 7, 2012 at 11:00 AM
Hi Hilmar,

Thank you for taking an interest in this topic. 

Here is my take on project structure and navigation structure. If the page is configured to "do not show in display" in navigation structure, then it should not be in the navigation structure at all. This way, only pages that do show up in navigation are in navigation structure. Size of navigation structure negatively impacts project performance. Also, number of navigation areas negatively impacts project performance.

For example, links to article pages do not get displayed in navigation. With the rendertag approach, user would have to configure "do not show in display" after page creation. This becomes usability and project performance issue as the number of article pages increases. It is a lot simpler to make the content class of the article page not a master page, so it is not added to navigation structure by default, hence making the project scalable.

From my experience, using breadcrumb placeholder over breadcrumb rendertag makes the project much more scalable since it is not tied to navigation structure.

Please feel free to further the discussion in reply.


Source: Breadcrumb: RenderTag Vs Placeholder

© copyright 2012 by Jian Huang

       

Downloads

 

QuickLinks

 

Channel