Screenshots

About modxSmarty

modxSmarty allow to use template-system Smarty in MODX front-end.

Information

Released
December 28, 2012
Supported Versions
2.0 – Current
Supported Database
MySQL, Microsoft SQL Server
Downloads
6,570
License
GPLv2

Instructions

Using MODX-elements via Smarty

{$modx}

=====================

You may use {$modx} tag with full MODX API support, for example {$modx->resource->get('pagetitle')}

Snippet

=====================

{snippet name="SnippetName" params="var=value&var2=value" parse="true"}

parse - not necessary. If set 'true', output will be parsed by MODX-parser. Default - false

params - not necessary. Can use String or Array.

Example 1

PHP: $modx->smarty->assign('params', array("param1" => "value", "param2" => "value",))

Template: {snippet name="test" params=$params}

Example 2

{snippet name="test" assign=params}{snippet name="test2" params=$params nocache}

Chunk

===================

{chunk name="ChunkName" params="var=value&var2=value" noparse="true"}

noparse - not necessary. If set 'true', output will not be parsed by MODX-parser. Default - false

params - not necessary. Can use String or Array.

System variable

{config name="configName"}

Example

{config name="site_name"}

return $modx->getOption('site_name')

Placeholder

===================

{px name="configName"}

Field

{field name="modResourceFieldName"}

Link

{link id="modResourceID"}

TV

{tv name="TvName" contentid="modResourceID" parse="true"}

contentid - not necessary. If not specified, will be used current modResource.

parse - not necessary. If set 'true', output will be parsed by MODX-parser. Default - false

Parser

===================

{parser content="some content with MODX-tags"}

Processor

===================

{processor action="web/menu/getcatalogmenu" location=path ns="npghardwarestore" params="foo=foo"}

return $modx->runProcessor();

action - required.

ns (namespace) - optionaly. If set, path for namespace_core_path/processors/ will be created automaticly

location - optionaly. See MODx::runProcessor manual.

params - optionaly. $scriptPproperties.

Addition params

===================================================

You can set this params for all this tags

assign

===================

{chunk name=chunk_name assign=param}

Assign chunk result to var $param.

nocache

===================

{chunk name=chunk_name nocache}

If Smarty caching enabled, this tag will be no-cached.

More

New in modxSmarty 1.0.3-beta

modxSmarty-1.0.3-beta

More

Current Releases

1.0.3-beta
December 28, 2012
2.0 – Current
More

More from Nikolay Lanets

Co

Console

Console allow to execute php-code at back-end by simple interface.Please,…

RF

modResourceField

Initial content

Dr

Dropbox

--------------------Dropbox Media Source--------------------Navigates…

HA

modHybridAuth

Authorization through social networks.Attention! Programming skills…