Download the PHP package briceburg/silverstripe-flexiaddress without Composer
On this page you can find all versions of the php package briceburg/silverstripe-flexiaddress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download briceburg/silverstripe-flexiaddress
More information about briceburg/silverstripe-flexiaddress
Files in briceburg/silverstripe-flexiaddress
Package silverstripe-flexiaddress
Short Description Add microdata friendly addresses and phone numbers to your SilverStripe objects.
License BSD-3-Clause
Homepage https://github.com/briceburg/silverstripe-flexiaddress
Informations about the package silverstripe-flexiaddress
silverstripe-flexiaddress
Add microdata friendly addresses and phone numbers to your SilverStripe objects.
Features
- schema.org microdata templating
- extend any DataObject
- reduces administrative repetitiveness and improves consistency through many_many relationships
- extensible through YAML Configuration and subclassing
Requirements
The venerable GridFieldExtensions https://github.com/ajshort/silverstripe-gridfieldextensions
Tested in SilverStripe 3.1
Screenshots
Usage
-
Add address and phone numbers to your Objects by extending them with
FlexiAddressExtension
. - Trigger the environment builder (/dev/build) after extending your objects -- You will now see the Address tab when editing Office in the CMS.
Front-end
FlexiAddress provides a shortcut to return the first address associated. Here's an example Office.ss
html
$Title
... $FlexiAddresshtml
$Title
... <% loop FlexiAddresses %>Address
<% include FlexiAddress %> Get Directions <% loop PhoneNumbers %> <% include FlexiAddressPhone %> <% end_loop %> <% end_loop %> ...yaml
FlexiAddressExtension: flexiaddress_fields:
- StreetLine1
- City
-
PhoneNumbers yaml
Office: flexiaddress_fields:
- StreetLine1
- City
-
PhoneNumbers yaml
Global Change
FlexiAddressExtension: flexiaddress_tab: Root.Addresses
Class Specific
Office: flexiaddress_tab: Root.Main flexiaddress_insertBefore: Content
* Strategy 2: Through your extended class
### Changing the Add New GridField Button
If you don't like "Create New Address", follow the _Changing the Address Tab Name_
procecedure, but alter the **flexiaddress_addButton** propperty.