Revindex Storefront

How to expand all categories

Last updated on 2016-05-06 1 mins. to read

The latest Revindex Storefront uses a Telerik RadTreeView control to render the categories. To expand all the categories, you can create a custom display template and add a OnClientLoad event with some javascript.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Display.ascx.cs" Inherits="Revindex.Dnn.RevindexStorefront.Portals._default.Display.Category.Standard3.Display" %>
<%@ Register Assembly="DotNetNuke.Web.Deprecated" Namespace="DotNetNuke.Web.UI.WebControls" TagPrefix="dnn2" %>

<div class="rvdsfCategoryContainer">
  <dnn2:DnnTreeView ID="CategoryDnnTreeView" runat="server" ShowLineImages="false" CssClass="rvdsfCategoryTreeView" Skin="" OnClientLoad="CategoryDnnTreeView_Loaded">
      <a href='<%# DataBinder.Eval(Container, "NavigateUrl") %>'>
        <%# DataBinder.Eval(Container, "Text") %></a>

<script type="text/javascript">
function CategoryDnnTreeView_Loaded(treeView, args)
  var nodes = treeView.get_allNodes();
  for (var i = 0; i < nodes.length; i++)
    if (nodes[i].get_nodes() != null)


Woody May 04, 2016 7:29 PM
In the example above you need to change the Assembly reference

Stephen Lim May 06, 2016 5:07 AM
Good catch. It's corrected now. Thanks!
Elizabeth Senger Jan 23, 2017 11:27 PM
Would it be possible to have the template focus on just one top-level node of the category tree?
Stephen Lim Jan 24, 2017 8:45 PM
Yes, the next version of Storefront v11 coming out in a few week will be based on Razor templates and will have a choice to show in tree view or single level list.

Powered by Revindex Wiki