Linux server.kiran-academy.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
: 194.233.91.196 | : 216.73.216.216
Cant Read [ /etc/named.conf ]
7.4.32
finalho
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
local /
cwpsrv /
var /
services /
twig /
doc /
tags /
[ HOME SHELL ]
Name
Size
Permission
Action
autoescape.rst
1.65
KB
-rw-r--r--
block.rst
448
B
-rw-r--r--
do.rst
177
B
-rw-r--r--
embed.rst
6.84
KB
-rw-r--r--
extends.rst
7.19
KB
-rw-r--r--
filter.rst
463
B
-rw-r--r--
flush.rst
218
B
-rw-r--r--
for.rst
4.46
KB
-rw-r--r--
from.rst
275
B
-rw-r--r--
if.rst
1.92
KB
-rw-r--r--
import.rst
1.72
KB
-rw-r--r--
include.rst
2.47
KB
-rw-r--r--
index.rst
238
B
-rw-r--r--
macro.rst
2.61
KB
-rw-r--r--
sandbox.rst
764
B
-rw-r--r--
set.rst
1.64
KB
-rw-r--r--
spaceless.rst
1.14
KB
-rw-r--r--
use.rst
3.18
KB
-rw-r--r--
verbatim.rst
367
B
-rw-r--r--
with.rst
1.07
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : set.rst
``set`` ======= Inside code blocks you can also assign values to variables. Assignments use the ``set`` tag and can have multiple targets. Here is how you can assign the ``bar`` value to the ``foo`` variable: .. code-block:: jinja {% set foo = 'bar' %} After the ``set`` call, the ``foo`` variable is available in the template like any other ones: .. code-block:: jinja {# displays bar #} {{ foo }} The assigned value can be any valid :ref:`Twig expressions <twig-expressions>`: .. code-block:: jinja {% set foo = [1, 2] %} {% set foo = {'foo': 'bar'} %} {% set foo = 'foo' ~ 'bar' %} Several variables can be assigned in one block: .. code-block:: jinja {% set foo, bar = 'foo', 'bar' %} {# is equivalent to #} {% set foo = 'foo' %} {% set bar = 'bar' %} The ``set`` tag can also be used to 'capture' chunks of text: .. code-block:: jinja {% set foo %} <div id="pagination"> ... </div> {% endset %} .. caution:: If you enable automatic output escaping, Twig will only consider the content to be safe when capturing chunks of text. .. note:: Note that loops are scoped in Twig; therefore a variable declared inside a ``for`` loop is not accessible outside the loop itself: .. code-block:: jinja {% for item in list %} {% set foo = item %} {% endfor %} {# foo is NOT available #} If you want to access the variable, just declare it before the loop: .. code-block:: jinja {% set foo = "" %} {% for item in list %} {% set foo = item %} {% endfor %} {# foo is available #}
Close