Problem with code logic for view layout and Smarty

38 views
Skip to first unread message

Arthurx Diabolik

unread,
Jun 1, 2017, 11:51:07 AM6/1/17
to Simple Groupware
Hello,

I adress you because I need to change position of the prime view's elements of SGS (asset filter and limiter) and I don't understand how Smarty does that.
I identified some template like a asset_edit.tpl (in the directory C:\wamp\www\Simple GroupeWare\bin\templates) but i don't know where is it called. 

Please, someone can help me?

Thanks by advance for ansers. 


Patrick Pliessnig

unread,
Jun 2, 2017, 4:37:11 AM6/2/17
to Simple Groupware
Hi Arthurx

You find a lot of other sub_templates in the directory ..bin\templates\helper.
They are included with an include statement in other templates like asset_edit.tpl.

Templates like asset_edit.tpl or asset_display.tpl etc are called by the sgsml interpreter based on the view definition of a xml schema ( a module )

If for example you have a view definition like this:
  <view name="display" displayname="Display" template="display"></view>

then the sgsml interpreter will load asset_display.tpl to display the data.

If you want to use your own template version, best is to copy the original template in the custom folder like this: ..\custom\templates\asset_edit.tpl and modify it.

you can also change the name and call it explicitly:
<view name="display" displayname="Display" template="asset_myNewTemplate"></view>

Hope this helps
Patrick

Arthurx Diabolik

unread,
Jun 7, 2017, 5:29:16 AM6/7/17
to Simple Groupware
Hello, 

Thank you of this answer. It does'nt have me unfortunately, it was not able to help me because I am bad to express. 
I am a beginner and I inquire about templates because the analysis of the existing is very complex  what makes that I risk to return ^^

Arthur

Arthur DUJACQUIERE

unread,
Jun 7, 2017, 12:11:34 PM6/7/17
to Simple Groupware
I would like to understand in which simple order groupware call his functions until the display of pages html via templates. Thus I tried to cause errors in the code to obtain the stackTrace, unfortunately SGS prevents the errors from occurring.

Could you help me to trace the call of the functions?

The objective is to change the display of the filters of the assets which by default is at the bottom of the page, and I would bring it at the top.

Thank you, Arthur
Message has been deleted

Arthurx Diabolik

unread,
Jun 8, 2017, 11:32:14 AM6/8/17
to Simple Groupware
Hello Patrick,

First, thanks for your quick anwsers:

I tried to move that code:

 {if !$iframe && $t.schema_mode neq "static"}
   {include file="helper/filters.tpl"}
   {include file="helper/pages.tpl"}
 {/if}

But the filter doesn't move. I tried to move it from line 186/189 to line 144/147 into "main.tpl" (just after <table class='noprint'...> what I think is the tab bar of the view).
I don't unterstand why nothing change. 

Are the positioning of the filters is coded in other files?

Patrick Pliessnig

unread,
Jun 13, 2017, 9:59:24 AM6/13/17
to Simple Groupware
Hey Arthur

SGS normally caches the output to increase performance. Also your browser might cache the output again.

To make modifications show up you need to empty the output cache of simple groupware ( in the System folder / also check output cache in the manual ) and your browser's cache.

Did you empty the caches before testing your changes??
Patrick
Reply all
Reply to author
Forward
Message has been deleted
0 new messages