XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
compiler.xoAppUrl.php File Reference

Go to the source code of this file.

Namespaces

namespace  xos_opal
 

Functions

 smarty_compiler_xoAppUrl ($argStr, &$compiler)
 

Function Documentation

smarty_compiler_xoAppUrl (   $argStr,
$compiler 
)

Inserts the URL of an application page

This plug-in allows you to generate a module location URL. It uses any URL rewriting mechanism and rules you'll have configured for the system.

To ensure this can be as optimized as possible, it accepts 2 modes of operation:

Static address generation:
This is the default mode and fastest mode. When used, the URL is generated during the template compilation, and statically written in the compiled template file. To use it, you just need to provide a location in a format XOOPS understands.

// Generate an URL using a physical path ([xoAppUrl modules/something/yourpage.php]) // Generate an URL using a module+location identifier (2.3+) ([xoAppUrl mod_xoops_Identification::logout])

Dynamic address generation:
The is the slowest mode, and its use should be prevented unless necessary. Here, the URL is generated dynamically each time the template is displayed, thus allowing you to use the value of a template variable in the location string. To use it, you must surround your location with double-quotes ("), and use the Smarty quoted strings syntax to insert variables values.

// Use the value of the $sortby template variable in the URL ([xoAppUrl "modules/something/yourpage.php?order=<tt>$sortby</tt>"])

Definition at line 50 of file compiler.xoAppUrl.php.

References $url, and $xoops.