Structure Url Alias is a module that will create one or more aliases of your Structure Page or Listings. This may handy in times when you need two or more url`s pointing to the same Page.
Structure Url Alias comes by default with a new publish tab, where you can enter your alias url's. By default the url will validated and checked on duplicated uri`s
Make sure your system meets the minimum requirements:
After the installation, there will be a new tab available on the publish area. Here you can enter all your alias urls on each new line.
The module will validate the url by default on valid url. Duplicated aliases are allowed, and will be showed on the overview page.
The Structure URL Alias is an extension that will link a different url to an entry. This way a structure url can be loaded from multiple urls without redirecting or changing the alias url.
The image below will show, in a simple way the flow.
In the Control Panel of the module you can overview all your created aliases. From here you can edit the entry.
In the settings tab you can enter your license key, created by devot:ee
The 'Synchronize all alias' button will preform a sync on all aliases and will correct the 'current path' if needed. By default this is handled on saving an entry, but in rare situations you will need this to sync the 'curent path'. (The 'current path' is not used but only showed to the end-user)
Global Varaibles follow the pattern what Structure also does {structure_url_alias:variable:value}
Get the url alias segment from the url. n is the number of the segment.
{structure_url_alias:segment:n}
Get the full url alias path
{structure_url_alias:segment:all}
Get the last url alias segment
{structure_url_alias:segment:last}
Get the uri alias path
{structure_url_alias:alias:uri}
Shows if the page is a alias or a real structure page
{structure_url_alias:alias:url}
Show the entry id which is aliases
{structure_url_alias:alias:entry_id}
Following variables are available in the {exp:channel:entries}
loop.
Entry has aliases
{has_alias}
Entry has no aliases
{no_alias}
Get the total alias count
{count_alias}
Get the start date for a aliases defined in the publish page
{alias_date_start}
Get the enddate for a aliases defined in the publish page
{alias_date_end}
Get the n
(number) alias uri (outside a {aliases}
loop)
{alias_uri_n}
Get the alias uri (get allways the first alias) (outside a {aliases}
loop)
{alias_uri}
Get the n
(number) alias url
{alias_url_n}
Get the alias url (get allways the first alias) (outside a {aliases}
loop)
{alias_url}
Below are the variables for inside the {aliases}...{/aliases}
tagpair
Get the uri alias (inside the {aliases}
loop)
{aliases}
{alias_uri}
{/aliases}
Get the url alias (inside the {aliases}
loop)
{aliases}
{alias_url}
{/aliases}
Get the count number for the alias
{aliases}
{alias_count}
{/aliases}
(added in v1.3)
this hook is triggered before saving the aliases from the publish tab.
if ($this->EE->extensions->active_hook('structure_url_alias_save_full_alias_begin') === TRUE)
{
$this->EE->extensions->call('structure_url_alias_save_full_alias_begin', $paths);
}
(added in v1.3)
this hook is triggered after saving the aliases from the publish tab.
if ($this->EE->extensions->active_hook('structure_url_alias_save_full_alias_end') === TRUE)
{
$this->EE->extensions->call('structure_url_alias_save_full_alias_end', $paths_inserted);
}
(added in v1.3)
this hook is triggered when the url is a alias and the extension load the correct entry.
if ($this->EE->extensions->active_hook('structure_url_alias_load_alias') === TRUE)
{
$this->EE->extensions->call('structure_url_alias_load_alias', $alias);
}
(added in v1.4)
this hook is triggered when the url is a alias and the extension load the correct entry.
if ($this->EE->extensions->active_hook('structure_url_alias_save_relative_alias_begin') === TRUE)
{
$this->EE->extensions->call('structure_url_alias_save_relative_alias_begin', $paths);
}
(added in v1.4)
this hook is triggered when the url is a alias and the extension load the correct entry.
if ($this->EE->extensions->active_hook('structure_url_alias_save_relative_alias_end') === TRUE)
{
$this->EE->extensions->call('structure_url_alias_save_relative_alias_end', $paths_inserted);
}