CMS Breadcrumb, separate tables for breadcrumb and page
I'm trying to build a breadcrumb navigation into a CMS.
Currently, the database is set out that there is a table holding each page, in rows.
I've created a table which holds:
item id, item text and it开发者_如何学JAVAem URL for each item/category in the breadcrumb.
I'm not entirely sure where to start with placing an additional column in the table which holds the pages, with a serialised array: [1,2,5] which is then joined to the other table, to extract the relevant information, by the id numbers.
The first question you should be asking is how does the CMS natively correlate the records in the DB to the actual page hierarchy of the site... Once you have that figured out then you can decide if you even need to store the breadcrumb separately, or if there is a way you can access this same information with the existing data.
精彩评论