Page 1 of 1

LISE, adapt item template for enduser

Posted: Sun Dec 30, 2018 6:34 pm
by erpee
I want to adapt the item template for my users.

At the begin of the template the user is given the following options:
* Alias:
* Choose a custom URL for this item or accept the generated one:
* Use time control:


I don't want the user to fill out these things. Can I just remove the following code in edititem.tpl, or is it possible that I will create an Error?

Code: Select all

    <div class="pageoverflow">
      <p class="pagetext">{$mod->ModLang('alias')}:</p>{$alias|default:''}
      <p class="pageinput">{$input_alias}</p>
    </div>

    <div class="pageoverflow">
      <p class="pagetext">{$mod->ModLang('url')}:</p>{$url|default:''}
      <p class="pageinput">{$input_url}</p>
    </div>

    <div class="pageoverflow">
      <p class="pagetext">{$mod->ModLang('time_control')}:</p>
      <p class="pageinput">{$input_time_control}</p>
    </div>

    <div id="expiryinfo"{if $use_time_control != true} style="display:none;"{/if}>
      <div class="pageoverflow">
        <p class="pagetext">{$mod->ModLang('start_time')}:</p>
        <p class="pageinput">{$input_start_time}</p>
      </div>

      <div class="pageoverflow">
        <p class="pagetext">{$mod->ModLang('end_time')}:</p>
        <p class="pageinput">{$input_end_time}</p>
      </div>
    </div>

Re: LISE, adapt item template for enduser

Posted: Wed Jan 02, 2019 4:45 pm
by velden
Please also read this part: https://docs.cmsmadesimple.org/customiz ... -templates but note that if I remember correctly LISE doesn't use the /assets/ directory yet. So you might need to create the module_custom folder in the root.

Re: LISE, adapt item template for enduser

Posted: Wed Jan 02, 2019 5:06 pm
by DIGI3
I don't think you can remove them, particularly alias, but you could probably hide them with css.

Re: LISE, adapt item template for enduser

Posted: Thu Jan 03, 2019 2:39 am
by webform
Yes, as velden says, you have to use module_custom folder in root for the LISE module (module_custom/Instance name/templates/edititem.tpl) for your template edits.

And as DIGI3 says use CSS to hide a particular field.
An example from one of my own templates:

Code: Select all

    <div class="pageoverflow" style="display: none;">
      <p class="pagetext">{$mod->ModLang('alias')}:</p>{$alias|default:''}
      <p class="pageinput">{$input_alias}</p>
    </div>

    <div class="pageoverflow" style="display: none;">
      <p class="pagetext">{$mod->ModLang('url')}:</p>{$url|default:''}
      <p class="pageinput">{$input_url}</p>
    </div>

    <div class="pageoverflow" style="display: none;">
      <p class="pagetext">{$mod->ModLang('time_control')}:</p>
      <p class="pageinput">{$input_time_control}</p>
    </div>

    <div id="expiryinfo"{if $use_time_control != true} style="display:none;"{/if}>
      <div class="pageoverflow">
        <p class="pagetext">{$mod->ModLang('start_time')}:</p>
        <p class="pageinput">{$input_start_time}</p>
      </div>

Re: LISE, adapt item template for enduser

Posted: Sat Jan 05, 2019 7:44 am
by erpee
Thanks, this will help a lot!