G
Guest
I'd want to make a custom class that will generate breadcrumb navigation for
my site via a recursive query, e.g. Home > Page1 > Subpage 1. I've
structured my database with hierarchical parent/child relationships. Can
someone help me set up the code structure?
I'm using ASP VBScript, and I have a table structure similar to the
following:
NavItems
----------
NavitemID (PK)
Nav_ParentID
Nav_Name
The top level record in the entire table is "1", but it would be nice if I
could parameterize the function so that I could specify the ID of the
current page and the ID of the topmost ID I want to trace to, e.g.
GetTrailOfBreadcrumbs(CurrentNavitemID, TopmostNavitemID)
The least expensive approach from the standpoint of the database would be
something that used something besides ADO recordsets to grab the data. If
someone has some code lying around or can offer some guidance, I'd sure
appreciate it.
Thanks.
-KF
my site via a recursive query, e.g. Home > Page1 > Subpage 1. I've
structured my database with hierarchical parent/child relationships. Can
someone help me set up the code structure?
I'm using ASP VBScript, and I have a table structure similar to the
following:
NavItems
----------
NavitemID (PK)
Nav_ParentID
Nav_Name
The top level record in the entire table is "1", but it would be nice if I
could parameterize the function so that I could specify the ID of the
current page and the ID of the topmost ID I want to trace to, e.g.
GetTrailOfBreadcrumbs(CurrentNavitemID, TopmostNavitemID)
The least expensive approach from the standpoint of the database would be
something that used something besides ADO recordsets to grab the data. If
someone has some code lying around or can offer some guidance, I'd sure
appreciate it.
Thanks.
-KF