[SOLVED] AdvancedContent: "multi_input"

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
stijlXpres
Forum Members
Forum Members
Posts: 137
Joined: Tue May 05, 2009 12:10 pm

[SOLVED] AdvancedContent: "multi_input"

Post by stijlXpres »

Hi,

I've implemented this great module several times. Works great.
But I cannot seem to get working is the "multi_input"

When I follow the ModuleHelp, and place the following in my template:

Code: Select all

  {content block="module_1" label="Page modules" block_type="multi_input" inputs="module,module,module,module"}
  {content block="module selection" block_type="dropdown" items="|News|Gallery|Menu"}
  {content block="module params" block_type="text" oneline=true}
It doesn't show this (as described in the Help):
It will show you a fieldset with legend "Page modules".
Inside this fieldset it shows the multi_input named "module" four times.
That means you see four lines with two input fields. A dropdown and a text input.
Instead it shows 3 Content Blocks in the backend. What am I doing wrong.

Thanx
Last edited by stijlXpres on Tue Mar 22, 2011 10:14 am, edited 1 time in total.
hoshy

Re: AdvancedContent: "multi_input"

Post by hoshy »

Yeah, the multi_input stuff seems a bit strange to me. I hope this will be improved in future releases. (Don't like the handling)
But i get it to work several times.
Did you create a multi_input named "module" in the module admin panel?
What version?

Here is what i used several times:

Multi-Input in modul admin panel:

Code: Select all

{content block="module_title" label="Module Title" block_type="text" oneline=true}
{content block="module_select" label="Module" block_type="dropdown" items="|News|Menu|Gallery|Calendar" values="|CGBlog|MenuManager|Gallery|CGCalendar"}
{content block="module_params" label="Modul Parameters" block_type="text" oneline=true size="48"}

Multi-Input template:

Code: Select all

<div class="pageoverflow" style="border-bottom:1px solid #CCC">
<table>
{foreach from=$inputs item=elm}
<tr><td>{$elm.label}</td><td>:&nbsp;{$elm.input}</td></tr>
{/foreach}
</table>
<br />
</div>
<br />
and in my page tmplate i use this:

Code: Select all

{AdvancedContent block="modules_left" label="Page Modules" block_type="multi_input" inputs="modules,modules,modules,modules,modules,modules" block_tab="Left Column" assign="modules_left"}

{if $modules_left|replace:'<!-- multi_input_value_delimiter -->':''|replace:'<!-- multi_input_delimiter -->':''|strip != ''}
	{assign var="modules" value="<!-- multi_input_delimiter -->"|explode:$modules_left}
	{foreach from=$modules item="module" name="modules"}
		{if $module|replace:'<!-- multi_input_value_delimiter -->':''|replace:'<!-- multi_input_delimiter -->':''|strip != ''}
			{assign var=module_items value="<!-- multi_input_value_delimiter -->"|explode:$module}
			{if isset($module_items[1]) && $module_items[1]|strip != ''}
			
			<div class="content module">
				<a class="accessibility" name="modules_left_{$module_items[1]}_{$smarty.foreach.modules.iteration}"></a>
				
				{if $module_items[0] != ''}
				
				<h2 class="title">{$module_items[0]}</h2>
				
				{else}
				
				<h3 class="accessibility">{$module_items[1]}</h3>
				
				{/if}
				{if isset($module_items[2]) && $module_items[2]|strip != ''}
					{eval var=$smarty.ldelim|cat:'cms_module module="'|cat:$module_items[1]|cat:'" '|cat:$module_items[2]|cat:$smarty.rdelim}
				{else}
					{eval var=$smarty.ldelim|cat:'cms_module module="'|cat:$module_items[1]|cat:'"'|cat:$smarty.rdelim}
				{/if}
				
			</div>
			
		{/if}
	{/if}
	{/foreach}
{/if}
User avatar
stijlXpres
Forum Members
Forum Members
Posts: 137
Joined: Tue May 05, 2009 12:10 pm

Re: AdvancedContent: "multi_input"

Post by stijlXpres »

Hey Hoshy,

Thanks a lot. I had no idea I had to add/edit templates in the AdvancedContent Module. Now it works; this module is great, does exactly what I want it to do!

Case closed!
Post Reply

Return to “Modules/Add-Ons”