Forums
This topic is locked
Creating a breadcrumb path
Posted 31 Jan 2002 03:03:39
1
has voted
31 Jan 2002 03:03:39 Travis Brown posted:
I want to create a breadcrumb trail for each page returned in a search. What I've got to work with is an id column and a parent path in the format 12-155-124, with the numbers being the ids of the ancestory related to the returned page. There is an indefinite amount of numbers in the parent path. Could be none, could be ten. I need to do, I think, is split the parent path for each item in the repeat region and call the associated page titles and parent paths for each ID from the split.A breakdown looks sort of like this:
Page_ID: 152
Parent_path: 12-101-211-212
Page_title: page 5
PageID: 212
parent_path: 12-101-211
Page_title: Page 4
Page_ID: 211
parent_path: 12-101
Page Title: page 3
etc.
I want to then create a path like: This page is in: Page 1 >> Page 2 >> page 3 >> Page 4
Here's what I have so far:
ancestory = SPLIT(rs.Fields.Item("parent_path","-" To get the array
items = UBOUND(ancestory)
then loop it
For i = 0 to items (Which looped, should return in sequence 12 101 211 212 152, right?)
response.write i
next
But I'm stuck here. How do I call the page titles for each item in the array and loop them?
Almost every bit of this is new to me, so help is appreciated.
Replies
Replied 31 Jan 2002 12:24:45
31 Jan 2002 12:24:45 Owen Eastwick replied:
Hi Travis,
Take a look at:
www.evolt.org/article/Breadcrumbs_for_Those_Using_ASP/17/4438/
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Take a look at:
www.evolt.org/article/Breadcrumbs_for_Those_Using_ASP/17/4438/
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 31 Jan 2002 22:30:58
31 Jan 2002 22:30:58 Travis Brown replied:
Thanks Owen. The readymade breadcrumb extensions that I've used and seen generally use server.mapath and the folder heirachy. The site I'm working on is essentially a one page site, so map.path doesn't really add anything. I think I need to create an array of page titles from the array of page ids in the parent path. Maybe loop a dynamic SQL query based on variables from the array of the parent path or something.