https://github.com/helderberto/cakephp-slugel
🔨 CakePHP: Slug behavior using CakePHP 2.x.
https://github.com/helderberto/cakephp-slugel
behavior cakephp cakephp-plugin cakephp2 library plugin slug
Last synced: 12 months ago
JSON representation
🔨 CakePHP: Slug behavior using CakePHP 2.x.
- Host: GitHub
- URL: https://github.com/helderberto/cakephp-slugel
- Owner: helderberto
- License: mit
- Created: 2017-12-13T00:03:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-13T00:18:53.000Z (about 8 years ago)
- Last Synced: 2025-01-24T10:28:04.893Z (about 1 year ago)
- Topics: behavior, cakephp, cakephp-plugin, cakephp2, library, plugin, slug
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# CakePHP 2.x Slugel
Simple way to create slug's to your results
## Getting Started
These instructions to running this behavior in your project.
### Prerequisities
1. [CakePHP 2.x](https://github.com/cakephp/cakephp/tree/2.x);
### Installing
1. Clone the project into your Plugin folder located within your project using this `https://github.com/helderburato/cakephp-slugel`;
2. Rename the folder `cakephp-slugel` to `Slugel`;
## How to use
1. In your model, just load in $actsAs:
Default use the field `name` and make `virtualField` like `slug` in your results.
````
public $actsAs = array(
'Slugel.Slugel'
);
````
If your want to use other field and make other slug name, run like this:
````
public $actsAs = array(
'Slugel.Slugel' => array(
'field' => 'otherField',
'slug' => 'mySlugField'
)
);
````
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [SemVer](http://semver.org/) for versioning.
## Authors
* **Helder Burato Berto** - *Initial work* - [helderburato](https://github.com/helderburato)
See also the list of [contributors](https://github.com/helderburato/cakephp-slugel/graphs/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details