Skip to content

Instantly share code, notes, and snippets.

@asika32764
Created June 19, 2017 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asika32764/63ab638a1e3101f2bf638e4211b6e018 to your computer and use it in GitHub Desktop.
Save asika32764/63ab638a1e3101f2bf638e4211b6e018 to your computer and use it in GitHub Desktop.
Luna & Warder 1.2 新增功能

Luna & Warder 1.2 新增功能

Luna 1.2

新增 Contact

170619-0001

前後台新增 error_extends 設定

可以對 error page 設定不同的 extends

  // ...

  'view' => [
    'extends' => '_global.html',
    'error_extends' => '_global.html'
  ],

前台 List Model 可以用更多篩選器

  • CategoriesModel
  • TagsModel
  • ArticlesModel
  • CommentsModel
$categories = (new CategoriesModel)
	->type('article')
	->hasRoot(false)
	->onlyAvailable() // published() + locale()
	->getItems();

更多預設 Fields

LunaFieldTrait 加上

  • userModal()
  • categoryList()
  • tagList()
  • languageList()

等快速 methods

且所有 fields 的 set('foo') 現在都有 foo() 這樣的 setters 可以用

前台 Category 的 Controller 可以給所有 type 使用

以前只能給 Articles 用,現在藉由設定 route 可以自定 Model/View

article_category:
    pattern: /category/(*path)
    controller: Category
    extra:
        layout: category
        # Add your settings here
        category:
            type: article
            model: Articles
            view: Category
            ordering: article.created
            direction: DESC
            deep: true
        active:
            manimenu: category

Warder

前後台新增 noauth_extends

可以對 login, registration, forget password 設定不同的 extends

// ...

  'view' => [
    'extends' => '_global.html',
    'noauth_extends' => '_global.html'
  ],

Email 統一用 Punycode 存進資料庫

可支援中文域名

Earth

修正 Menu HTML

Menu 的 HTML 修改成 <li> 為主形式,方便套用模版

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment