Download the PHP package bringyourownideas/inheritage-by-sitetree without Composer
On this page you can find all versions of the php package bringyourownideas/inheritage-by-sitetree. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bringyourownideas/inheritage-by-sitetree
More information about bringyourownideas/inheritage-by-sitetree
Files in bringyourownideas/inheritage-by-sitetree
Package inheritage-by-sitetree
Short Description Allows you to inheritage information from the parent pages
License BSD-3-Clause
Homepage https://github.com/bringyourownideas/inheritage-by-sitetree
Informations about the package inheritage-by-sitetree
SilverStripe Inheritage by SiteTree

Allows you to inherit any property from parent pages (any level). Check out the usage example to see how it works.
Features
-
Loading information from direct or indirect parent page.
- This is only tested for db-fields. Has_one or has_many hasn't be confirmed.*
Usage
The following example shows a possible use case of two page types which have a fixed position in the information architecture and using inheritage to get the "color" field to the sublanding page.
in SubLandingPage.ss you can do this now:
to retrieve the Color value set on the parent. Please ensure you apply suitable caching to any calls.
Requirements and installation
Requirements
- SilverStripe Framework and CMS ^3.0
Installation
-
Run the following command to install the package:
-
Set up your Extension
This can be done either via a yml configuration file (e.g. mysite/_config/config.yml):
or by checking the InheritageBySiteTreeExtension.php and adding the "non-extension" version of the module to your Page.php-file. The second option is more performant.
- Run dev/build to load extension
misc: future ideas/development, issues, contrib, license
This project is supported by bring your own ideas Ltd.. Bring Your Own Ideas Ltd. helps you to make your project ideas to reality.