Documentation


URL

The url plugin gives you access to url data and logic.

The user plugin's slug is url, so it can be used like so:

{pyro:url:function}

Functions

{pyro:url:current}

Displays the full current URL.

 
{pyro:url:site}

Displays the full site URL.

Attributes

Name Default Required Description
uri None No The URI segments passed to the site_url function.

Example:

{pyro:helper:site uri="contact"}
With mod_rewrite: http://www.example.com/contact
Without mod_rewrite: http://www.example.com/index.php/contact

{pyro:url:base}

Displays the full site base URL regardless of mod_rewrite settings.

Example

{pyro:url:base}

http://www.example.com

 


{pyro:url:segments}

Displays a specific URL segment.

Attributes

Name Default Required Description
segment None Yes Number of the segment of the URL you want to use.
default None No A default value to use if nothing is in the URL segment specified.

Example:

{pyro:url:segments segment="1" default="home"}

Outputs "home" on the home page or "galleries" when viewing the galleries module.

{pyro:url:anchor}

Generates an anchor tag based on the supplied attributes. This is essentially a wrapper for the built in anchor() function found in the url helper.

Attributes

Name Default Required Description
segments None Yes The segments passed to the anchor function.
title None No The text that is displayed between the <a></a> tags. If omitted, the generated url will be displayed.
class None No A class to be assigned to the anchor tag.

Example:

{pyro:url:anchor segments="users/login" title="Login" class="login"}