API - XOOPS 2.5.11 Beta 2
By monxoops.fr
compiler.xoAppUrl.php File Reference

Namespaces

namespace  xos_opal
 

Functions

 smarty_compiler_xoAppUrl ($argStr, &$compiler)
 

Function Documentation

◆ smarty_compiler_xoAppUrl()

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 {@link http://smarty.php.net/manual/en/language.syntax.quotes.php Smarty quoted strings} syntax to insert variables values. <code> // Use the value of the $sortby template variable in the URL ([xoAppUrl "modules/something/yourpage.php?order=`$sortby`"])

Parameters
$argStr
$compiler
Returns
string