0 votes

Hi all!

I'm new with Efficy customization and i wanted to train with macros by adding 2 widgets to the dashboard like this:


WidgetTemplate100 {[<%Macro("$MACRO$", $KEY$=100, $KIND$="Macro", $TITLE$="Top 10 Clients", 
        $ICON$="i-Comp", $COLLAPSED$="$COLLAPSE$", $SENTITY$="Comp",

First10Customers#Comp {[
        <%RunQuery(id="First10CustomersQuery", store=1000, SQL="select TOP 10 K_COMPANY, NAME from R_COMPANIES where KIND = 12 order by K_COMPANY desc")%>
        <%GetDataGrid(query="First10CustomersQuery", count=-1, noheader="true", norecords="Aucune fiche", columndefs="GridColumns.txt", entity="Comp", columns="NAME{COMPANY}")%>

WidgetTemplate101 {[<p>Second Widget is Here!</p>]}

The first one works, but I can not display the second

I tried to custom \dialog\WidgetsTodayCustom.htm but it's like if Efficy ignore this custom file... (these 2 lines do the same things: The first widget works but the second don't show up...)


Are there other places where it's defined ?

Thanks a lot!

asked in Efficy/ Client side by (245 points)

1 Answer

+2 votes
Best answer

Hi try to add this :

WidgetTemplate101 {[<%Macro("$MACRO$", $KEY$=101, $KIND$="Macro", $TITLE$="Top 10 Clients", 
    $ICON$="i-Comp", $COLLAPSED$="$COLLAPSE$", $SENTITY$="Comp",

and then your custom snd widget with no datagrid :

    Second Widget is Here!

The widgetTemplateMacro needs all the parameters to work properly the fact that your widget will display or not a Runquery / dataGrid has nothing to do with the fact that severals parameters need to be filled.

Basically the WidgetTemplateMacro parameters will allow you to set the widget container behavior (the border with the minimize button, the title, the colapse option, ...)

answered by (983 points)
selected by
1,166 questions
1,424 answers
325 users