I know somewhere is given answer to these questions, but I have no premium subscription.
Need a solution as function or class.
please NO GPL and do not post links from search engines, I need concrete solution (will not accept these answers)
I do have a DB table pid, s_pid, menu_name, tooltip, content ... (table name cms_pages)
s_pid is "parent" default value 0 and pid is "main"
I need to render Recursive Tree menu (unlimited sub levels) from DB and want to generate clean UL (unordered list xhtml valid)
As is on my CMS:
I need this functionality without using sessions or cookies and by inputting just one parameter example pid (the main index, node)
when parameter pid is requested even if it is sub or sub-sub item it should expand main, sub, sub (making css class or id "current" for that sub and main node.
the result should be printed by function
plus a solution if one main item does not exist or is deleted the sub items (if deleted main item) should become as main
also I need the same way a breadcrumb
show current pid just getting one parameter ...
Start » Page 1 [Articles] » Sub-Page 1.3 [Articles] » test
That means the system should be able to find if current parameter is main item or if is sub or sub-sub-sub find it self the main item ...
waiting for you