Template get parent category

Moved NodeBB Development
  • Hey!

    How do I get the parent of the actual category in a Tamplate?

    Im just looking around and found this:

    <!-- IF breadcrumbs.length -->
    <ol class="breadcrumb">
    	<!-- BEGIN breadcrumbs -->
    	<li<!-- IF @last --> component="breadcrumb/current"<!-- ENDIF @last --> itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb" <!-- IF @last -->class="active"<!-- ENDIF @last -->>
    		<!-- IF [email protected] --><a href="{breadcrumbs.url}" itemprop="url"><!-- ENDIF [email protected] -->
    			<span itemprop="title">
    				{breadcrumbs.text}
    				<!-- IF @last -->
    				<!-- IF !feeds:disableRSS -->
    				<!-- IF rssFeedUrl --><a target="_blank" href="{rssFeedUrl}"><i class="fa fa-rss-square"></i></a><!-- ENDIF rssFeedUrl --><!-- ENDIF !feeds:disableRSS -->
    				<!-- ENDIF @last -->
    			</span>
    		<!-- IF [email protected] --></a><!-- ENDIF [email protected] -->
    	</li>
    	<!-- END breadcrumbs -->
    </ol>
    <!-- ENDIF breadcrumbs.length -->
    

    How can I get the parent category-Name of the current (sub)category?
    Is there any reference I can use for such things in the future?

    What I like to do:

    1. Get the parent of the actual category
    2. use this value e.g. "foobar" to call the API of an external software and get JSON-Object depend on value "foobar"
    3. convert the data to display it between breadcrumbs / new topic in the nodeBB Forum

    Is it the right way to handle this with a template or am I completely wrong?
    I just installed nodeBB and I also do have no idea about node.js and all that stuff so sorry I am a noob. 🐵

    Kind regards, Pascal.


Suggested Topics


  • 3 Votes
    2 Posts
    78 Views
  • 1 Votes
    2 Posts
    2194 Views
  • 0 Votes
    2 Posts
    1016 Views
  • 1 Votes
    15 Posts
    5119 Views
  • Categories on Subdomains.

    NodeBB Development
    2 Votes
    10 Posts
    2480 Views