-1

I know it is possible to know what depth you are at with $category->depth, but is there a straght-forward way to check if it is indeed last level node? Thanks

1 Answers1

1

Within the category class there is a method called getLastPosition. It requires two parameters to be passed, but if you can get those it looks to me like it returns an integer of the last position. If depth also returns an integer then you should be able to compare the two to see if it comes out true. You will need to pass the id of the parent category and the id of the shop to the getLastPosition method for it to work.

{if $category->getLastPosition($id_parent, $id_shop) == $category->depth}

{/if}

I think that should work, however I did not test it.

Conner Burnett
  • 502
  • 1
  • 11
  • 24