Download the PHP package liupan-v/think-theme without Composer

On this page you can find all versions of the php package liupan-v/think-theme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package think-theme

ThinkPHP 5.1 多主题模板扩展

安装

composer require liupan-v/think-theme 2.*

优点

1.无侵入式, 不影响原来控制器的代码
2.可以最少模板代码实现主题的制作,新增主题主要新增差异部分,其他的模板调用默认主题相应位置的,不用重复编写便于维护

使用方法

复制本项目下config目录下的think_theme.php配置文件到你需要开启多主题功能的模块config目录下,并按注释进行相应配置
控制器或其他地方动态修改think_theme配置current的值,可实现模板的切换

举个栗子:
  1. 新建一个tp5项目: composer create-project topthink/think tp5test (tp5test是项目目录,cd进入这个目录)
  2. 安装主题插件:composer require liupan-v/think-theme 2.*
  3. 复制配置文件:vendor/liupan-v/think-theme/config/think_theme.php复制到application/index/config/think_theme.php
  4. 修改think_theme.php配置信息:
    return [
    'is_open' => true, //是否启用多主题配置,false为不开启,走框架默认的模板驱动
    'current' => 'theme1', //必填,当前主题名称,可在代码里动态赋值来改变当前主题
    'default' => 'default', //必填,默认主题名称
    'theme_path' => 'theme', //必填,可为空,主题目录地址,上级是对应的模块地址,如填theme,默认主题的路径则为application/模块名/theme/default
    ];
  5. 模板文件路径application/index/theme/theme1

注意事项

不要在要开启多主题的模块下,修改配置文件的template.type配置信息,即template.php配置里的type配置,否则多主题不会生效

其他

tp5.0的多主题:https://github.com/liupan-v/think-theme/tree/tp5.0


All versions of think-theme with dependencies

PHP Build Version
Package Version
Requires topthink/framework Version 5.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package liupan-v/think-theme contains the following files

Loading the files please wait ....