Documentation

block.url.php

Table of Contents

Functions

smarty_block_url()  : string
Generate a URL. This is thin wrapper for the Civi::url() helper.

Functions

smarty_block_url()

Generate a URL. This is thin wrapper for the Civi::url() helper.

smarty_block_url(array<string|int, mixed> $params, string $text, CRM_Core_Smarty &$smarty, bool &$repeat) : string
Parameters
$params : array<string|int, mixed>

The following parameters have specific meanings:

  • "assign" (string) - Assign output to a Smarty variable
  • "flags" (string) - List of options, as per Civi::url(...$flags) All other parameters will be passed-through as variables for the URL.
$text : string

Contents of block.

$smarty : CRM_Core_Smarty

The Smarty object.

$repeat : bool

Repeat is true for the opening tag, false for the closing tag

Tags
see
Civi::url()

Ex: Generate a backend URL. {url}backend://civicrm/admin?reset=1{/url}

Ex: Generate a backend URL. Assign it to a Smarty variable. {url assign=tmpVar}backend://civicrm/admin?reset=1{/url}

Ex: Generate a backend URL. Set optional flags: (t)ext, (s)sl, (a)bsolute. {url flags=tsa}backend://civicrm/admin?reset=1{/url}

Ex: Generate a URL in the current (active) routing scheme. Add named variables. (Values are escaped). {url verb="Eat" target="Apples and bananas"}//civicrm/fruit?method=[verb]&data=[target]{/url}

Ex: As above, but use numerical variables. {url 1="Eat" 2="Apples and bananas"}//civicrm/fruit?method=[1]&data=[2]{/url}

Ex: Generate a URL. Add some pre-escaped variables using Smarty {$foo}. {assign var=myEscapedAction value="Eat"} {assign var=myEscapedData value="Apples+and+bananas"} {url}//civicrm/fruit?method={$myEscapedAction}&data={$myEscapedData}{/url}

Return values
string

        
On this page

Search results