需要简单的面包屑菜单
我发现了很多关于如何创建面包屑菜单的论坛帖子,但似乎没有一个正是我想要的。
基本上我的网站页面是基于位置的,并遵循这个过程 - 主页>级别2> 3级。
作为数据库中位置的示例,它是 - home >曼彻斯特>索尔福德
我想做的就是在页面顶部获得一个文本面包屑菜单,看起来几乎与上面的示例一模一样。
因为页面是动态的,所以我需要一个 php 脚本,可以从 url 中提取页面标题信息,以便它对于您所在的任何页面都是正确的。
如果有人有一个可以帮助我的脚本,我将不胜感激。谢谢
i have found loads of forum posts about how to create a breadcrumb menu, but none of them seem to be exactly what i want.
Basically my sites pages are location based and follow this process - home > level2 > level3.
so as an example of the locations in the database it would be - home > Manchester > Salford
All im trying to do is get a text breadcrumb menu at the top of the page looking almost exactly like the the example above.
Because the pages are dynamic, i need a php script that can pull in the page title info from the url, so that it is correct for whichever page you are on.
if anyone has a script that can help me it'd be much appreciated. thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个,很简单,我认为这可能对您的需求有用:
Try this, is simple and i think that coould be usefull for your needs:
感谢您的回复。该代码确实帮助我直接从 url 中获取页面名称。
最后我意识到我想太多了,这就是我实现我需要的东西的方式:
Thanks for the reply. That code did help me get the page name directly out of the url.
In the end i realised i was over thinking it and this is how i achieved what i needed: