</dl>
{if MODULE_TAGGING}
- {if !$tags[0]|empty}
- {include file='tagInput' tagInputSuffix='0' tagSubmitFieldName='tags[0][]' tags=$tags[0] sandbox=true}
- {else}
- {include file='tagInput' tagInputSuffix='0' tagSubmitFieldName='tags[0][]' sandbox=true}
- {/if}
+ {include file='tagInput' tagInputSuffix='0' tagSubmitFieldName='tags[0][]' tags=$tags[0] sandbox=true}
{/if}
{event name='informationFields'}
{if MODULE_TAGGING}
{assign var='tagSubmitFieldName' value='tags['|concat:$availableLanguage->languageID:'][]'}
- {if !$tags[$availableLanguage->languageID]|empty}
- {include file='tagInput' tagInputSuffix=$availableLanguage->languageID tagSubmitFieldName=$tagSubmitFieldName tags=$tags[$availableLanguage->languageID] sandbox=true}
- {else}
- {include file='tagInput' tagInputSuffix=$availableLanguage->languageID tagSubmitFieldName=$tagSubmitFieldName sandbox=true}
- {/if}
+ {include file='tagInput' tagInputSuffix=$availableLanguage->languageID tagSubmitFieldName=$tagSubmitFieldName tags=$tags[$availableLanguage->languageID] sandbox=true}
{/if}
{event name='informationFieldsMultilingual'}
</dl>
{if MODULE_TAGGING}
- {if !$tags[0]|empty}
- {include file='tagInput' tagInputSuffix='0' tagSubmitFieldName='tags[0][]' tags=$tags[0] sandbox=true}
- {else}
- {include file='tagInput' tagInputSuffix='0' tagSubmitFieldName='tags[0][]' sandbox=true}
- {/if}
+ {include file='tagInput' tagInputSuffix='0' tagSubmitFieldName='tags[0][]' tags=$tags[0] sandbox=true}
{/if}
{event name='informationFields'}
{if MODULE_TAGGING}
{assign var='tagSubmitFieldName' value='tags['|concat:$availableLanguage->languageID:'][]'}
- {if !$tags[$availableLanguage->languageID]|empty}
- {include file='tagInput' tagInputSuffix=$availableLanguage->languageID tagSubmitFieldName=$tagSubmitFieldName tags=$tags[$availableLanguage->languageID] sandbox=true}
- {else}
- {include file='tagInput' tagInputSuffix=$availableLanguage->languageID tagSubmitFieldName=$tagSubmitFieldName sandbox=true}
- {/if}
+ {include file='tagInput' tagInputSuffix=$availableLanguage->languageID tagSubmitFieldName=$tagSubmitFieldName tags=$tags[$availableLanguage->languageID] sandbox=true}
{/if}
{event name='informationFieldsMultilingual'}
if (empty($_POST)) {
$this->setDefaultValues();
}
+
+ // init tags
+ if (!$this->isMultilingual) {
+ if (!isset($this->tags[0])) $this->tags[0] = [];
+ }
+ else {
+ foreach ($this->availableLanguages as $language) {
+ if (!isset($this->tags[$language->languageID])) $this->tags[$language->languageID] = [];
+ }
+ }
}
/**