Download the PHP package ludmanp/typicms-pageoptions without Composer
On this page you can find all versions of the php package ludmanp/typicms-pageoptions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ludmanp/typicms-pageoptions
More information about ludmanp/typicms-pageoptions
Files in ludmanp/typicms-pageoptions
Package typicms-pageoptions
Short Description Allow to add more parameters to a Page in TypiCMS
License MIT
Homepage https://github.com/ludmanp/typicms-pageoptions
Informations about the package typicms-pageoptions
PageOptions for TypiCMS
Allow to extend TypiCMS Page properties according to page templates.
Installation
You can install the package via composer:
To prepare for usage you can run
The command will publish and run the migrations.
You can alternatively run separate commands to do these operations:
Optionally, you can publish the views using
Usage
Admin
Include
into resources/viwes/vendor/pages/admin/_from.blade.php.
$model is the current Page model
Create blade file in resources/viwes/vendor/page-options/admin directory with page tempalate name.
For example default.blade.php
To add options you can use, for example,
To include specific images, use
name is option's name, use dots to make multilevel array.
label is optional, but recommended to distinguish from other image fields
The same way you can add file fields
Public
To output PageOptions use in page template (pages/public/*.blade/php)
To output simple option use
To output translatable option use
There is available optional locale parameter
To output image use
Additional parameters width, height and options are available, like in presenter's image method.
To get file model use.
As you can see above it is available also for images to get alt_attribute for example.
To make link to file you can write like following
Credits
- Mark Leidman
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of typicms-pageoptions with dependencies
bkwld/croppa Version ^7.0
genealabs/laravel-model-caching Version ^12.0
spatie/laravel-package-tools Version ^1.14.0
spatie/laravel-translatable Version ^6.11
typicms/core Version ^14.0
typicms/nestablecollection Version ^5.0