Skip to content

australiangreens/au.org.greens.contribpagealias

Repository files navigation

au.org.greens.contribpagealias

Screenshot

This extension adds support for creating pretty aliases for CiviCRM contribution pages

The extension is licensed under AGPL-3.0.

Requirements

Installation (Web UI)

This extension has not yet been published for installation via the web UI.

Installation (CLI, Zip)

Sysadmins and developers may download the .zip file for this extension and install it with the command-line tool cv.

cd <extension-dir>
cv dl au.org.greens.contribpagealias@https://github.com/australiangreens/au.org.greens.contribpagealias/archive/master.zip

Installation (CLI, Git)

Sysadmins and developers may clone the Git repo for this extension and install it with the command-line tool cv.

git clone https://github.com/australiangreens/au.org.greens.contribpagealias.git
cv en contribpagealias

Usage

Enable the extension. Now when creating Contribution Pages in Civi it is possible to specify a URL alias. If specified, the extension will call the Drupal path module to create/update a URL alias for the contribution page.

This means you can create Contribution Pages that have URLs like https://civicrm.example.org/donate-now instead of the standard https://civicrm.example.org/civicrm/contribute/transact?id=1&reset=1

Details

This extension uses Symfony event handlers to watch for Contribution Page edit and delete events. When detected it calls the Drupal functions path_load, path_save, etc., to manage URL aliases.

Known Issues

Limitations in the CiviCRM create workflow for Contribution Pages means it is not possible to succesfully set the alias at the same time as the contribution page is created. It is only possible to set it during an 'edit' operation for an existing page.

This extension makes use of the CiviCRM Entity Settings extension by Eileen McNaughton. This is no longer a recommended way of adding custom settings/fields to CiviCRM base entities.

This will be refactored in future.

About

Create custom URL aliases for CiviCRM Contribution Pages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages