0.1.1releasedURL Connector

Allows URLs to be mapped to pages with optional parameter testing. Also performs URL redirection.

Clone URLhttps://github.com/petertron/url_connector.git

Add as a submodulegit submodule add https://github.com/petertron/url_connector.git extensions/url_connector --recursive




URL Connector

URL connector is an extension for Symphony CMS which performs frontend URL routing and URL redirection.

How To Use

Symphony users will probably know what URL routing is. To view/edit routes select Blueprints -> URL Connections.


Here is an example route:

Source URL: /articles/{title}/, destination URL: article-page/{title}.

Braces are used to enclose path parameters. Parameters can be subjected to regular expression matching or 'type' testing where the type can be either numeric or non-numeric.

Adding PHP Code

The optional PHP field allows PHP code to be run after a URL route has been matched. This allows the request variables to be tested or modified.

Example PHP code:

// Allow connection only if this is an AJAX call.
if (!isset($_POST['ajax'])) {
    return false; // Move on to next route

// Create new field.
$_POST['fields']['fullname'] = "{$_POST['fields']['firstname']} {$_POST['fields']['surname']}";

Router Execution

Routes are processed in the order that they are defined. If the source URL does not match any defined route then the URL is passed on to Symphony's standard page routing.

Page Access

URL Connector creates a new page type, NDA, meaning "no direct access." A page of type NDA can be accessed only through URL Connector's routing system.

Version history

Symphony 2.5 to 3.0

        - Routing bug fixed.
	        - Modified for to be compatible with Symphony 3.0.0-alpha.1.

Symphony 2.5 to 2.6.2

        - First release.