代码示例
获取分类
// 获取新闻分类
$categories = getCat($parentCid, 'news');
// 获取产品分类
$categories = getCat($parentCid, 'product');
// 获取视频分类
$categories = getCat($parentCid, 'video');
参数说明
// $cid: 父分类ID
// $ctype: 内容类型 ('news', 'product', 'experience', 'master', 'kungfu', 'video', 'photo', 'factory')
// $order: 排序方式 (默认 'cid desc')
分类数据
| 分类名称 | 分类ID |
|---|---|
| 1 | 1 |
| 2 | 64 |
| 3 | 2 |
| 4 | 9 |
| 5 | 10 |
| 6 | 11 |
| 7 | 12 |
| 8 | 13 |
| 9 | 14 |
| 10 | 15 |
| 11 | 3 |
| 12 | 58 |
| 13 | 4 |
| 14 | 5 |
| 15 | 6 |
| 16 | 7 |
| 17 | 8 |
| 18 | 31 |
| 19 | 32 |
| 20 | 33 |
| 21 | 34 |