Toggle navigation
wCMF 4.0
Guides
Getting started
Architecture
Model
Persistence
Presentation
Configuration
Security
I18n & l10n
Tests
API
Code
Support
wcmf_older
wcmf
src
wcmf
application
views
plugins
block.assign_block.php
1
<?php
2
/**
3
* wCMF - wemove Content Management Framework
4
* Copyright (C) 2005-2015 wemove digital solutions GmbH
5
*
6
* Licensed under the terms of the MIT License.
7
*
8
* See the LICENSE file distributed with this work for
9
* additional information.
10
*/
11
12
/*
13
* Smarty plugin
14
* -------------------------------------------------------------
15
* File: block.assign_block.php
16
* Type: block
17
* Name: assign_block
18
* Purpose: assign a multiline string to a variable
19
* Parameters: var [required] - the name of the variable
20
* Usage: {assign_block var="myVar"}
21
* ... string to
22
* assign ...
23
* {/assign_block}
24
*
25
* Author: Ingo Herwig <ingo@wemove.com>
26
* -------------------------------------------------------------
27
*/
28
function
smarty_block_assign_block($params, $content, \Smarty_Internal_Template $template, &$repeat) {
29
if
(!empty($content)) {
30
$template->assign($params[
'var'
], $content);
31
}
32
}
33
?>