CMS Made Simple Forums
https://forum.cmsmadesimple.org/

LISE, adapt item template for enduser
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=79717
Page 1 of 1

Author:  erpee [ Sun Dec 30, 2018 6:34 pm ]
Post subject:  LISE, adapt item template for enduser

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?

\$1:
    <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>

Author:  velden [ Wed Jan 02, 2019 4:45 pm ]
Post subject:  Re: LISE, adapt item template for enduser

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.

Author:  DIGI3 [ Wed Jan 02, 2019 5:06 pm ]
Post subject:  Re: LISE, adapt item template for enduser

I don't think you can remove them, particularly alias, but you could probably hide them with css.

Author:  webform [ Thu Jan 03, 2019 2:39 am ]
Post subject:  Re: LISE, adapt item template for enduser

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:
\$1:
    <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>

Author:  erpee [ Sat Jan 05, 2019 7:44 am ]
Post subject:  Re: LISE, adapt item template for enduser

Thanks, this will help a lot!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/