wirelab / locations-module
Locations module for PyroCMS 3.
Installs: 62
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:streams-addon
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.4|~5.0
- symfony/css-selector: 3.1.*
- symfony/dom-crawler: 3.1.*
README
⚠️ This repository has been deprecated ⚠️
Locations module for PyroCMS 3 with dynamic field.
Overwriting the default view
The prefered / project specific way
php artisan addon:publish locations
- Edit the
show
view inresources/<site name>/addons/wirelab/locations-module/views/location
In a custom theme
In your theme's service provider add the following:
protected $overrides = [ 'wirelab.module.locations::locations/view' => 'your view path here', ];
Adding fields to a location
- In the location module go to
fields
and make a new field - In the
locations
section click onassignments
and assign the field
Adding locations to a page
- Create a multiple field in the pages module, assign it to Locations > Locations
- Assign the field to a page type
- In the page type loop over
page.your_slug
and callrender()
on the locations. Or callrender()
onpage.your_slug
to have it to loop for you. Examples:
page.your_slug.render()
{% for location in page.your_slug %} location.render() {% endfor %}
Not calling render will return the attributes of the location.
{% for location in page.your_slug %} {{ location.name }} {{ location.email }} {% endfor %}