# typecho 有用的主题代码

- Link: https://www.ixiqin.com/2020/06/11/the-theme-of-typecho-useful-code/
- Published: 2020-06-11T00:49:42+08:00
- Author: 白宦成

```null
    $this->need("xxx");
    // 提供插件的Hook
    $this->footer();
    ```

可以创建 category 、page目录，根据名字自动加载不同的模板
 文章为post目录，根据ID
自动加载不同的模板 有用的themeFields
