Details

  • View On packagist
  • Created by Simon Funk
  • Added on Aug 31, 2017
  • Total Downloads: 59
  • Monthly Downloads: 1
  • Daily Downloads: 0
  • Favourites: 7

Dynamicfield

Extend the Page module as much as you like. Easy and fast with multiple dynamic fields.

Dynamicfield

This module is working, but in a very alpha version. Using is at your own risk! You are welcome to work on it

Introduction

To make it work, you need to alter the Page Module.

in: Page/Resources/views/admin/create.blade.php Page/Resources/views/admin/edit.blade.php

add to @section('style') Line ~17

    @if($dynamicFieldCss)
        {!! $dynamicFieldCss !!}
    @endif

add to @section('scripts') Line ~90

    @if($dynamicFieldScript)
        {!! $dynamicFieldScript !!}
    @endif

in: Page/Resources/views/admin/partials/create-fields.blade.php
Line ~19

Page/Resources/views/admin/partials/edit-fields.blade.php
Line ~24

above

<

div class="box-group" id="accordion">

    @if($dynamicfield)
        {!! $dynamicfield->render($lang) !!}
    @endif

Usage

Creat a new Dynamicfield and select on the right side on which page template you wanna use it.

After you've created your first Dynamicfield, you can go to the Page create/edit view, select your desired Template and then, the Dynamicfield should appear automatically.

If nothing happens, make sure the dynamic-fields.js is loaded. Clear Cache and run the "module:publish dynamicfield" command

After you have created your Dynamicfield, set up your page and filled your data, your able to get the datas on your page template through the:

$dynamicfields

It's an array and inside are all fields, as well the repeater fields. the name of the indexes are the same which you have given for the field name.

Dynamicfield

This module is working, but in a very alpha version. Using is at your own risk! You are welcome to work on it

Introduction

To make it work, you need to alter the Page Module.

in: Page/Resources/views/admin/create.blade.php Page/Resources/views/admin/edit.blade.php

add to @section('style') Line ~17

    @if($dynamicFieldCss)
        {!! $dynamicFieldCss !!}
    @endif

add to @section('scripts') Line ~90

    @if($dynamicFieldScript)
        {!! $dynamicFieldScript !!}
    @endif

in: Page/Resources/views/admin/partials/create-fields.blade.php
Line ~19

Page/Resources/views/admin/partials/edit-fields.blade.php
Line ~24

above

<

div class="box-group" id="accordion">

    @if($dynamicfield)
        {!! $dynamicfield->render($lang) !!}
    @endif

Usage

Creat a new Dynamicfield and select on the right side on which page template you wanna use it.

After you've created your first Dynamicfield, you can go to the Page create/edit view, select your desired Template and then, the Dynamicfield should appear automatically.

If nothing happens, make sure the dynamic-fields.js is loaded. Clear Cache and run the "module:publish dynamicfield" command

After you have created your Dynamicfield, set up your page and filled your data, your able to get the datas on your page template through the:

$dynamicfields

It's an array and inside are all fields, as well the repeater fields. the name of the indexes are the same which you have given for the field name.

Module Download

Install any module with the php artisan asgard:download:module command.

php artisan asgard:download:module stonelab/dynamicfield --migrations

This will download the module and run its migrations.

Composer

composer require stonelab/dynamicfield

This is if the module is perfect for your use-case as-is, and doesn't need any changes to fit your needs.

Note: Don't forget to give yourself the required permissions before you can view the backend entries.

Mobile Analytics