We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Smarty shortcodes list? | Forum

Mac Fionn
Mac Fionn Aug 28 '20
Does anybody know if there is a compiled list of Smarty shortcodes listed anywhere?
Marcus Aug 28 '20

The Forum post is edited by Marcus Aug 28 '20
Mac Fionn
Mac Fionn Aug 28 '20

Quote from Marcus https://www.smarty.net/documentation
ok. didnt realize i needed to qualify this on an oxwall forum, but.. you got me.
So... any OXWALL smarty shortcodes? You know.. the ones that OXWALL uses 'only'? ;)
dave Team
dave Aug 28 '20
Are you referring to global vars.. as in {$value} from oxwall  ?
The Forum post is edited by dave Aug 28 '20
Mac Fionn
Mac Fionn Aug 29 '20
Hi Dave! :)
Exactly, yes... for template modification/creation purposes.
Marcus Aug 29 '20
im sorry but what global vsriables sre u talking about here. 
Paul Aug 31 '20
Each plugins and the system plugins uses their own assigns and views.
I think you are asking to use them in the theme master template.

The only "global" vars you can use are:

'title', 'headData', 'language', 'pageBody', 'bodyClass', rendered in core html_document, but those are not really global vars

The Forum post is edited by Paul Aug 31 '20
Marcus Aug 31 '20
u cant alter master page template from plugin template smarty. ud need to use php and then assign varisble or component. Actially u can load component via smatry
Paul Aug 31 '20
I think your answere is a little bit confusing and the last one is wrong. 

a) You need more than just php ;)

b) it is possoble to load components via smarty

I summarize it:
Each plugin (the system and the thirdpardy plugins) uses its own variables and templates.The only variables that can be used in the master templates are the ones I mentioned above. They cannot be inherited.
But You can load "some" components in Smarty via {component}

{component class='BASE_CMP_MainMenu' responsive=true}
you can even include other smarty templates:
{include file="ow_themes/teaser.html"}

But those are some part that works, other components are not always working as they should.

Example: I am using a custom landing/registration page and was going implement the join component via smarty with BASE_CMP_SignIn.
The join form was displayed, but misses all the javascript code.

So i had to render it in the contoller. eg.

$join = new BASE_CMP_SignIn(true);$this->assign('join', $join->render());
There is no right way to use oxwall code, there are serveral ways to use them. The easiest way is just to check the components, controller or models/bols of the plugins.

Marcus Aug 31 '20
I ment to say that u can overwrite master page teplate variables from ur plugin. 
The Forum post is edited by Marcus Aug 31 '20
dave Team
dave Aug 31 '20

hi mac sorry i thought i subscribed to this, sorry to reply so late.

the only globals i know about are here


as far as building the template or theme if thats what you want to do, im not so sure about that im not really a template person however i do know that as far as the css goes you just put in your custom theme only the css that you want to change.  It all feeds from the simplicity template, so in your custom template or theme you just put the css you want to change and the simplicity theme will do the rest.

So basically think of your theme file as an override, whatever you put in there will override what the simplicity them has.  That way you dont have to copy and work with the whole simplicity them, you just work with your changes..

As far as any other shortcuts i am not aware of any shortuces,  we do use

$this->assign('value',$value);  in php to assign the vars to smarty but thats not a theme project

The Forum post is edited by dave Aug 31 '20