Template get parent category
-
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 !@last --><a href="{breadcrumbs.url}" itemprop="url"><!-- ENDIF !@last --> <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 !@last --></a><!-- ENDIF !@last --> </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:
- Get the parent of the actual category
- use this value e.g. "foobar" to call the API of an external software and get JSON-Object depend on value "foobar"
- 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.
Copyright © 2024 NodeBB | Contributors