Foaly* wrote:
NaN wrote:
Format param? What for?
It returns timestamp. Formatting is only possible after assigning.
Hm... not a must have. But okay to have
Foaly* wrote:
NaN wrote:
Code: Select all
{content type="dropdown" values=":::menu template='myMenuTemplateWithContentAliasesOnly':::" items=":::menu template='myMenuTemplateWithMenuTextOnly':::" smarty="true"}
Smartytags in strings? That works how? Oo Possible since when? Sorry, didn't now that.
It was introduced by JeremyBass some while ago in the single file content type before the project was officially started. (see some earlier post of that topic)
That means if you set the param smarty=true all values will be processed by the smarty engine. So you can use the output of plugins, UDTs or even modules as param values.
But because you cannot use the default smarty delimiters '{' and '}' since it causes errors in frontend you need to use the colons as delimiters. If smarty is set to true the AdvancedContent module checks for each param if it contains a ':::'. If so it will be replaced by the smarty delimiters and processed by the template engine using the CMSms module API.
So the example above will have as dropdown values the result of the MenuManager.
It is like using this as values:
Code: Select all
{menu template="yourSpecialVaulesTemplateHere"}
But it only will be processed in backend when displaying the content blocks.
It is not processed in frontend (since it is not needed here).
Foaly* wrote:
NaN wrote:
As long as we have modules and module templates that already do what we want, we don't need further block types since we have smarty in backend now (thanks again to Jeremy for that great idea).
What exactly are you speaking about?
I just mean that you can use the same functions in backend in the edit page area that are initially meant for frontend to fill the param values of your content block. And as long as you can realise your content block using the output of a module, UDT or plugin you don't need to add any new functions to the AdvancedContent module.
E.g.: There is no module that creates sortable multiple select lists. So i had to add a function to realise this. But there is a module that lists pages. So i don't need to create a new block type for that. Just see the MenuManager example. You can do the same to create a news category dropdown or whatever.
As long as you can use the output of a module, UDT or plugin that you can also call in your content/template using smarty syntax {cms_module module="SomeModule"} or {yourAwesomeUDTPlugin} to fill your param values of the content block you don't need a special block type.
Anyway what additional fields are needed anymore? You have textarea (with or without WYSIWYG), textinput, checkbox, dropdown, select multiple (even sortbale) and some special fields like file- and datepicker.
You don't need radio buttons because they do the same like a dropdown.
You also don't need password fields because it doesn't make any sense to me.
So you have almost everything you need to customize your edit panel.
The only interesting thing is how to fill the fields with dynamic values without hardcoding them in the template.
So if you need to fill the fields with values that relates to some certain modules (or just can be done in any way by them), use the certain module itself to fill it.
And even if there is no module for your purposes (e.g. list all GCBs to create a GCB dropdown) just create a UDT or plugin that does the job, assign it as param value to the block using the ':::' delimiters and tell the AdvancedContent module to process the value using the smarty engine (param smarty=true) before displaying it.