Home > Backend Development > PHP Tutorial > laravel编写的blog cms 如何优雅的切换主题

laravel编写的blog cms 如何优雅的切换主题

WBOY
Release: 2016-06-06 20:17:23
Original
1567 people have browsed it

问题:大家在用laravel编写blog或者cms的时候,如果遇到多个主题,是如果设计优雅的切换,和为后期增加主题留下空间.

回复内容:

问题:大家在用laravel编写blog或者cms的时候,如果遇到多个主题,是如果设计优雅的切换,和为后期增加主题留下空间.

将视图文件存在views下不同的文件夹,
eg:

  1. /views/default

  2. /views/blue

before检测,赋值$theme

return View::make($theme.'dir.page')


一个laravel theme包:https://github.com/teepluss/laravel-theme

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template