You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AtoM Users
hello,
In a hierarchical tree, I've been trying to find out what level I'm currently on. in particular if i'm on the last (lowest). is there a php function for this I havent found or so I need to use SQL to do this?
best regards
martin
José Raddaoui
unread,
Apr 11, 2023, 1:47:04 PM4/11/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AtoM Users
Hi Martin,
Guessing you are talking about knowing that from a code perspective. There is a PHP method for that called `hasChildren()` on entities with nested set, it just checks the `rgt - lft` difference without hitting the database again. Here an example of its usage: