- concrete5 Cookbook
- David Strack
- 113字
- 2021-08-13 16:15:57
Getting a page's path
In addition to being able to get a page's ID, developers can also retrieve the path for a page. In this recipe, we will load a page by its ID and then retrieve its path.
How to do it...
The steps for getting a page's path are as follows:
- Open
/config/site_post.php
in your preferred code editor. - Load the page by its ID. We will use the ID of
4
here, which should belong to a page on the dashboard.$page = Page::getByID(4);
- Get the page's path.
$path = $page->getCollectionPath();
- Use the custom debugging function to output the path.
my_debug($path);
See also
- The Getting a page by its ID recipe
推薦閱讀
- 深度實踐OpenStack:基于Python的OpenStack組件開發
- Python數據分析入門與實戰
- AIRAndroid應用開發實戰
- Learning Apache Kafka(Second Edition)
- Apache Kafka Quick Start Guide
- Learning Laravel's Eloquent
- Java網絡編程核心技術詳解(視頻微課版)
- Node Cookbook(Second Edition)
- Essential C++(中文版)
- Spring技術內幕:深入解析Spring架構與設計原理(第2版)
- C指針原理揭秘:基于底層實現機制
- Photoshop CC移動UI設計案例教程(全彩慕課版·第2版)
- Mastering SciPy
- ROS機器人編程實戰
- Learning Cocos2d-JS Game Development