zicht / url-bundle
Url utilities for Symfony
Installs: 27 908
Dependents: 5
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 14
Type:symfony-bundle
Requires
- php: ^8.1
- doctrine/common: ^2.4 || ^3.0
- doctrine/dbal: ^2.13.1 || ^3
- doctrine/orm: ^2.5
- doctrine/persistence: ^2.13 || ^3
- symfony/config: ^6.4
- symfony/console: ^6.4
- symfony/dependency-injection: ^6.4
- symfony/http-foundation: ^6.4
- symfony/security-core: ^6.4
- symfony/translation-contracts: ^1 || ^2 || ^3
- zicht/admin-bundle: ^9
- zicht/framework-extra-bundle: ^11
- zicht/util: ^2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- phpunit/phpunit: ^9.6
- dev-release/8.x
- dev-release/7.x
- 8.0.0
- 7.3.1
- 7.3.0
- 7.2.5
- 7.2.4
- 7.2.3
- 7.2.2
- 7.2.1
- 7.2.0
- 7.1.0
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.1.0
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.3.0
- 5.2.7
- 5.2.6
- 5.2.5
- 5.2.4
- 5.2.3
- 5.2.2
- 5.2.1
- 5.2.0
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.0
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 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
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.20.1
- 2.20.0
- 2.19.2
- 2.19.1
- 2.19.0
- 2.18.1
- 2.18.0
- 2.17.1
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.1
- 2.13.0
- 2.12.1
- 2.12.0
- 2.11.1
- 2.11.0
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.1
- 2.9.0
- 2.8.7
- 2.8.6
- 2.8.5
- 2.8.4
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.0
- 2.6.1
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.11.0
- 1.10.1
- 1.7.2
- 1.7.0
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.2
- 1.5.1
- 1.5.0
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.8
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0
- 0.9
- dev-release/6.x
- dev-release/5.x
- dev-feature/slash-suffixed-url-handling_v5
- dev-release/4.x
- dev-feature/public-alias-handler
- dev-release/2.x
- dev-feature/ZICHTDEV-1097
- dev-feature/multisite-poc
- dev-release/3.x
This package is auto-updated.
Last update: 2024-11-02 14:55:57 UTC
README
This bundle is part of the zicht/cms
suite.
The ZichtUrlBundle provides the following features:
- URL "Aliasing" - use seo-friendly url's without routing. The principle is that any url can have an alias which is used to show "readable" url's to the user. The general approach works in a way that is interchangable: each aliased version of any url can be translated to the unaliased version and vice versa. HTML code in the content database should never refer to aliased urls, so this integrates tightly with TinyMCE in the admin.
- By implementing the ProviderInterface, any service can be turned into an
object router; i.e.: link to "objects" in stead of paths. This is utilized in
the
zicht/page-bundle
to be able to link to Page object - Static references: named url's which can be injected anywhere in your project
- Validation constraints
Validator Constraints usage
Zicht\Bundle\RcoSiteBundle\Entity\Page\ContentPage:
getters:
body:
- Zicht\Bundle\UrlBundle\Validator\Constraints\ContainsValidUrls: ~
Tinymce Form type extension
If the TinyMce form type is used from the admin bundle. The type is extended to transform external urls to internal urls. No additional configuration is required
Show public URLS of a page in the admin
To enable this feature, add the following to a page admin, and make sure that form_theme.html.twig from the url-bundle is loaded.
// use Zicht\Bundle\UrlBundle\Admin\AliasOverviewType;
public function configureFormFields(FormMapper $formMapper): void
{
parent::configureFormFields($formMapper);
$formMapper
->tab('admin.tab.alias_overview')
->add('alias_overview', AliasOverviewType::class, ['record' => $this->getSubject()])
->end()->end();
}
Importing a csv with aliases
Use the command php bin/console zicht:url:import-aliases url_aliases_file.csv --skip-header --csv-delimiter ';'
This command can parse csv files that follow the following syntax:
PUBLICURL, INTERNALURL, TYPE, CONFLICTINGPUBLICURLSTRATEGY, CONFLICTINGINTERNALURLSTRATEGY
/home, /nl/page/1
/also-home, /nl/page/1
Note that the first line can be ignored using "--skip-header" TYPE, CONFLICTINGPUBLICURLSTRATEGY, and CONFLICTINGINTERNALURLSTRATEGY are optional.'
Events
Sitemap
There is an event that makes it possible to modify the resultset of the sitemap;
zicht_url.sitemap.filter
, which allows you to modify the result from the previous query and filter out items.
Maintainers
- Boudewijn Schoon boudewijn@zicht.nl