Posted by Kim G on 12/09/07 02:50
Hi.
I am having some trouble with a recursive function that displays a
menu. In my database I have two fields that matters: page_id and
parent_id. Displaying the menu correctly is not a problem, but I need
it to expand the subpages of a parent page only when the user is
reading the parent page of a set of subpages, or one of the subpages,
or one of the subpages' subpage etc.. When the user is reading the
frontpage, only the pages with parent_id = 0 should be displayed.
Does anyone have a reasonable solution to this problem?
[Back to original message]
|