Basic <tridion:TaxonomyControl> code for displaying a taxonomy

Add the Server Control or Custom Tag <tridion:TaxonomyControl> to show a taxonomy-based navigation. The taxonomy control exposes settings controlling what is displayed.

The following examples show the basic code for displaying a taxonomy, without filtering applied (large taxonomies with thousands of items would take considerable amount of time to load).

ASP.NET

To display a taxonomy in a ASPX, add <tridion:TaxonomyControl> to the page and specify the TCM URI of a published taxonomy in the TaxonomyURI attribute:

<%@ Page Language="C#" AutoEventWireup="true" Debug="true"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">   
    <title>Display Basic Taxonomy in ASPX</title>
  </head>
  <body>
    <form id="form1" runat="server">
      <tridion:TaxonomyControl ID="taxBasicProperties" TaxonomyURI="tcm:94-535-512" runat="server">
      </tridion:TaxonomyControl>
    </form>
  </body>
</html>
Java
To display a taxonomy in a JSP, you add a Tridion custom tag <tridion:TaxonomyControl> to the page and specify the TCM URI of a published taxonomy in the taxonomyURI attribute:
<%@ page language="java" contentType="text/html"%>
<%@ taglib uri="/cd_tags.tld" prefix="tridion" %>
<html>
	<head><title>Display Basic Taxonomy in JSP</title></head>
	    <body>   
         <form>				
	      	    	<tridion:TaxonomyControl taxonomyURI="tcm:94-535-512" />              
          </form>
	    </body>
</html>
Where uri=/cd_tags.tld refers to a URI, relative or absolute, that uniquely identifies the tag library. If it is relative it must be mapped to an absolute location in the taglib element of a Web application deployment descriptor, the configuration file associated with Web applications developed according to the Java Servlet and JavaServer Pages specifications. prefix="tridion" defines the prefix that distinguishes tags provided by a given tag library from those provided by other tag libraries.