Categories Widget | Show all Sub-Categories too?
-
after fiddeling around the complete day, i have found it!
if anyone else need it, you can change the categories.tpl in /nodebb-widget-essentials/public/templates/widgets/ for example into:# code block <!-- BEGIN categories --> <ul class="categories-list"> <li> <!-- IF !categories.link --> <h4><a href="{relative_path}/category/{categories.slug}">{categories.name}</a></h4> <!-- ELSE --> <h4><a href="{categories.link}">{categories.name}</a></h4> <!-- ENDIF !categories.link --> <!-- BEGIN children --> <!-- IF categories.children.link --> <a href="{categories.children.link}" itemprop="url" target="_blank"> <!-- ELSE --> <a href="{config.relative_path}/category/{categories.children.slug}" itemprop="url"> categories.children.name}</a><br /> </div> <!-- ENDIF categories.children.link --> <!-- END children --> </li> </ul> <!-- END categories -->
-
@xanthos84 said in Categories Widget | Show all Sub-Categories too?:
code block
<!-- BEGIN categories -->
<ul class="categories-list">
<li>
<!-- IF !categories.link -->
<h4><a href="{relative_path}/category/{categories.slug}">{categories.name}</a></h4>
<!-- ELSE -->
<h4><a href="{categories.link}">{categories.name}</a></h4>
<!-- ENDIF !categories.link -->
<!-- BEGIN children -->
<!-- IF categories.children.link -->
<a href="{categories.children.link}" itemprop="url" target="_blank">
<!-- ELSE -->
<a href="{config.relative_path}/category/{categories.children.slug}" itemprop="url">
categories.children.name}</a><br />
</div>
<!-- ENDIF categories.children.link -->
<!-- END children -->
</li>
</ul>
<!-- END categories -->@xanthos84/ @baris : I tried this but it does not work. is there any other way?
-
This should work with latest widget essentials (4.1.1).
<!-- BEGIN categories --> <ul class="categories-list"> <li> <!-- IF !categories.link --> <h4><a href="{relative_path}/category/{categories.slug}">{categories.name}</a></h4> <!-- ELSE --> <h4><a href="{categories.link}">{categories.name}</a></h4> <!-- ENDIF !categories.link --> <!-- BEGIN categories.children --> <p> <!-- IF categories.children.link --> <a href="{categories.children.link}" itemprop="url" target="_blank"> <!-- ELSE --> <a href="{config.relative_path}/category/{categories.children.slug}" itemprop="url"> {categories.children.name}</a><br /> </div> <!-- ENDIF categories.children.link --> </p> <!-- END categories.children --> </li> </ul> <!-- END categories -->