dreamseeker / craft-jpaddress

This plugin is Address FieldType of the Japanese format for Craft CMS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JP Address plugin for Craft CMS

This plugin is Address FieldType of the Japanese format for Craft CMS.

Screenshot

Installation

To install JP Address, follow these steps:

  1. Download & unzip the file and place the jpaddress directory into your craft/plugins directory
  2. -OR- do a git clone https://github.com/dreamseeker/craft-jpaddress.git directly into your craft/plugins folder. You can then update it with git pull
  3. Install plugin in the Craft Control Panel under Settings > Plugins
  4. The plugin folder should be named jpaddress for Craft to see it. GitHub recently started appending -master (the branch name) to the name of the folder for zip file downloads.

JP Address works on Craft 2.6.x.

JP Address Overview

JP Address adds a 'JP Address' FieldType for Craft CMS that you can add to any of your Sections.

Configuring JP Address

Create a JP Address field via Settings->Fields.

Using JP Address

Once you have created the JP Address field, add it to your Section Entry Types, and fill in address information. Each address can contain Google Maps Coordinates.

[hint] You can change it in Settings->Plugins, if Google Maps Coordinates is unnecessary. Google Maps API Key can input in the same screen, too.

Using JP Address in your Templates

To display information about a jpaddress in your templates, you just use familiar Twig code. If the field handle for your JP Address field is "sampleAddress", this is what you'd use to output information about it.

Basic Info

  • {{ entry.sampleAddress.postalCode }} - Postal code
  • {{ entry.sampleAddress.prefecture }} - Name of prefectures
  • {{ entry.sampleAddress.cityStreet }} - City name, Street Address (when Use City Field? setting is invalid.)
  • {{ entry.sampleAddress.city }} - City name (when Use City Field? setting is valid.)
  • {{ entry.sampleAddress.street }} - Street name (when Use City Field? setting is valid.)
  • {{ entry.sampleAddress.building }} - Building name, etc.
  • {{ entry.sampleAddress.latitude }} - Latitude for Google Maps
  • {{ entry.sampleAddress.longitude }} - Longitude for Google Maps
  • {{ entry.sampleAddress.zoomLevel }} - Zoom Level for Google Maps

JP Address Roadmap

Some things to do, and ideas for potential features:

  • For a list of Prefecture

JP Address Changelog

1.0.4 -- 2017.03.18

  • Add Use City Field in Settings->Plugins. If choose it, you can input city and street address at independent field.
  • Fixed a bug that can't view Google Maps when edit entry.

1.0.3 -- 2017.03.11

  • Fixed a bug that can't set Google Maps Coordinates when create new entry in relatedTo modal window.

1.0.2 -- 2017.03.11

  • Fixed a JavaScript error to occur when create new entry in relatedTo modal window.

1.0.1 -- 2017.03.11

  • Fixed a JavaScript error to occur when you did not use Google Maps Coordinates.
  • Update explanations of README.md

1.0.0 -- 2016.05.08

  • Initial release

Brought to you by Toru Kokubun

Special Thanks

To automatically insert the address according to the input of the postal code, we use the Ninton G.K.'s library.
https://github.com/ninton/jquery.jpostal.js/

About

This plugin is Address FieldType of the Japanese format for Craft CMS.

License:MIT License


Languages

Language:JavaScript 36.6%Language:PHP 36.5%Language:HTML 23.0%Language:CSS 3.9%