定制 microman/kirby-inherit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

microman/kirby-inherit

最新稳定版本:2.0.4

Composer 安装命令:

composer require microman/kirby-inherit

包简介

Get field from parent page if empty

README 文档

README

Get the field of the parent pages if it's empty or not exists. It goes all up till the site.

Installation

Manually

Download and copy the plugin into your plugin folder: /site/plugins/

With Composer

composer require plain/kirby-inherit

How to use

Let's say you want to get a hero image. The editor can set it on each page. But he don't have an image for every page. Use this code to look if the parent page has a image set:

    $page->hero_image()->inherit()

It goes all way up. At the end it will take the imgae from the main site.

Inherit form another page

You can also use it for another page:

    $page->hero_image()->inherit( page('another_site') )

License

This plugin is free to use and is published under the MIT license. If you use this plugin for commercial purposes or wish to show your appreciation, support me with a donation.

统计信息

  • 总下载量: 47
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固