studioespresso / craft-easyaddressfield
此包的最新版本(5.0.2)没有提供许可证信息。
您需要的唯一地址字段
5.0.2
2024-09-09 18:01 UTC
Requires
- craftcms/cms: ^5.0.0-alpha
- giggsey/locale: ^2.0.0
- league/iso3166: ^3.0
- maxh/php-nominatim: ^2.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
- craftcms/rector: dev-main
- dev-develop-v5
- v5.x-dev
- 5.0.2
- 5.0.1
- 5.0.0
- 5.0.0-alpha.1
- 4.0.11
- 4.0.10
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 4.0.0-beta.1
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 1.4.0
- 1.3.0
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- dev-develop
- dev-master
- dev-craft3
This package is auto-updated.
Last update: 2024-09-09 18:02:40 UTC
README
您需要的唯一地址字段
要求
此插件需要Craft CMS 3.0.0-RC1或更高版本。
安装
要安装插件,请按照以下说明操作。
-
打开您的终端并转到您的Craft项目
cd /path/to/project
-
然后告诉Composer加载插件
composer require studioespresso/craft-easyaddressfield
-
在控制面板中,转到设置→插件,并点击“Easy Address Field”的“安装”按钮。
模板变量
打印地址值
您可以通过以下变量通过Twig访问地址字段的值
field.name field.street field.street2 field.postalCode field.state field.country // returns the country code field.getCountryName(craft.app.locale) // returns the coutry's full name, in the country's locale field.latitude field.longitude field.getDirectionsUrl() // get a directions link to the given address
从Craft 4升级到Craft 5
getDirectionsUrl()
如果您在craft.address
上使用getDirectionsUrl()
函数,现在您需要在该字段本身上调用该函数,而不是在插件的Twig变量上。
getStaticMap() & getStaticMapRaw()
这些函数已被从插件中移除,您需要自己替换这些函数。