https://github.com/collective/collective.contact_behaviors
A collection of contact information behaviors and vocabularies for Dexterity content types
https://github.com/collective/collective.contact_behaviors
dexterity plone plone-addon plone6
Last synced: 3 months ago
JSON representation
A collection of contact information behaviors and vocabularies for Dexterity content types
- Host: GitHub
- URL: https://github.com/collective/collective.contact_behaviors
- Owner: collective
- License: gpl-2.0
- Created: 2023-06-21T16:28:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-27T14:59:44.000Z (almost 2 years ago)
- Last Synced: 2025-01-09T09:55:48.050Z (5 months ago)
- Topics: dexterity, plone, plone-addon, plone6
- Language: Python
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Contact Behaviors for Plone
[](https://pypi.org/project/collective.contact_behaviors/)
[](https://pypi.org/project/collective.contact_behaviors/)
[](https://pypi.org/project/collective.contact_behaviors/)
[](https://pypi.org/project/collective.contact_behaviors/)
[](https://pypi.org/project/collective.contact_behaviors/)[](https://pypi.org/project/collective.contact_behaviors/)
[](https://github.com/collective/collective.contact_behaviors/actions/workflows/meta.yml)
[](https://github.com/collective/collective.contact_behaviors)
[](https://github.com/collective/collective.contact_behaviors)## Features
`collective.contact_behaviors` is a collection of additional behaviors and vocabularies for Dexterity content types.
### Behaviors
* `collective.contact_behaviors.address_info`: Provides address information fields:
* address
* address_2
* city
* state
* postal_code
* country* `collective.contact_behaviors.contact_info`: Provides contact information fields:
* contact_email
* contact_website
* contact_phone### Permissions
| id | title | Usage |
| -- | -- | -- |
| collective.contact_behaviors.address_info.view | collective.contact_behaviors: View Basic Address Information | Read access to `city`, `state`, `postal_code`, `country` |
| collective.contact_behaviors.address_info_details.view | collective.contact_behaviors: View Detailed Address Information | Read access to `address`, `address_2` |
| collective.contact_behaviors.contact_info.view | collective.contact_behaviors: View Contact Information | Read access to `contact_email`, `contact_website`, `contact_phone` |### Catalog Indexes
This package adds Indexes and Metadata to Portal Catalog.
| Content Attribute | Index Type | Metadata |
| -- | -- | -- |
| country | FieldIndex | ✅ |
| contact_email | FieldIndex | ❌ |## See it in action
This package is being used by the following add-ons:
* [`collective.casestudy`](https://github.com/collective/collective.casestudy)
## Documentation
This package is supposed to be used by Plone integrators on their add-ons.
### Installation
Add `collective.contact_behaviors` as a dependency on your package's `setup.py`
```python
install_requires = [
"collective.contact_behaviors",
"Plone",
"plone.restapi",
"setuptools",
],
```Also, add `collective.contact_behaviors` to your package's `configure.zcml` (or `dependencies.zcml`):
```xml
```
### Generic Setup
To automatically enable this package when your add-on is installed, add the following line inside the package's `profiles/default/metadata.xml` `dependencies` element:
```xml
profile-collective.contact_behaviors:default
```And to enable the behaviors provided here to a specific content type, please edit your type configuration and include the following lines (or one of them) to the `behaviors` property:
```xml
```## Source Code and Contributions
We welcome contributions to `collective.contact_behaviors`.
You can create an issue in the issue tracker, or contact a maintainer.
- [Issue Tracker](https://github.com/collective/collective.contact_behaviors/issues)
- [Source Code](https://github.com/collective/collective.contact_behaviors/)### Development setup
You need a working Python environment version 3.8 or later.
Then install the dependencies and a development instance using:
```bash
make install
```By default, we use the latest Plone version in the 6.x series.
### Update translations
```bash
make i18n
```
### Format codebase```bash
make format
```
### Run tests```bash
make test
```## License
The project is licensed under GPLv2.