farmerstevieb/tina4php-catalog
Composer 安装命令:
composer require farmerstevieb/tina4php-catalog
包简介
Tina4 catalog Module
README 文档
README
# Tina4 CMS Module Welcome to the Tina4CMS module, how does it work? ``` composer require tina4stack/tina4cms composer exec tina4 initialize:run ``` Add the database connection to your index.php file which would have been created ``` require_once "vendor/autoload.php"; global $DBA; $DBA = new \Tina4\DataSQLite3("test.db","", "", "d/m/Y"); echo new \Tina4\Tina4Php(); ``` Run the CMS ```commandline composer start 8080 ``` Open up the CMS to setup the admin user http://localhost:8080/cms/login -> will get you started ### The Landing Page - home You need to create a landing page called "home" as your starting page for things to working properly. ### Customization Make a *base.twig* file in your */src/templates* folder, it needs the following blocks ``` {{ title }} {% block headers %} {% endblock %} {% block body %} {% block navigation %} {% include "navigation.twig" %} {% endblock %} {% block content %} {% endblock %} {% block footer %} {% endblock %} {% endblock %} ``` or an example which extends the existing base in the tina4-cms ``` {% extends "@tina4cms/base.twig" %} {% block headers %} {% endblock %} {% block body %} {% block navigation %} {% include "navigation.twig" %} {% endblock %} {% block content %} {% endblock %} {% endblock %} ``` #### Example of a navigation.twig which you can over write Create a *navigation.twig* file in your *src/templates* folder ``` {% set menus = Content.getMenu("") %}-
{% for menu in menus %}
- {{ menu.name }}
{% if menu.children %}
-
{% for childmenu in menu.children %}
- {{ childmenu.name }} {% endfor %}
{% endfor %}
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-08