<div dir="ltr"><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-family:arial,sans-serif;font-size:13px"></span><span style="font-family:arial,sans-serif;font-size:13px">It indicates the sort_by and search javascript functions on the listview screen use a hardcoded path to the templates and did not use the callback to the CustomModule directory.</span><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span><span style="color:rgb(204,0,0);font-family:arial,sans-serif;font-size:15px">Unable to load template file '</span><b style="color:rgb(204,0,0);font-family:arial,sans-serif;font-size:15px">modules/Vtiger/uitypes/MyMultiSelectFieldSearchView.tpl</b><span style="color:rgb(204,0,0);font-family:arial,sans-serif;font-size:15px">' in '</span><b style="color:rgb(204,0,0);font-family:arial,sans-serif;font-size:15px">modules/</b><b style="color:rgb(204,0,0);font-family:arial,sans-serif;font-size:15px"><b><b>CustomModule</b></b>/ListViewContents.tpl</b><span style="color:rgb(204,0,0);font-family:arial,sans-serif;font-size:15px">'</span></blockquote>
<div><br></div><div>Istavan,</div><div><br></div><div>The template name of ListViewSearch and Sort is not hard coded.</div><div><br></div><div>In ListViewContents.tpl under /layouts/vlayout/modules/Vtiger/ </div><div>around line 80,81</div>
<div><br></div><div><div>{<b><font color="#ff0000">include file=vtemplate_path($FIELD_UI_TYPE_MODEL->getListSearchTemplateName(),$MODULE_NAME</font></b>)</div><div> FIELD_MODEL= $LISTVIEW_HEADER SEARCH_INFO=$SEARCH_DETAILS[$LISTVIEW_HEADER->getName()] USER_MODEL=$CURRENT_USER_MODEL}</div>
</div><div><br></div><div>The above line marked in red loads the Template file for the respective FieldUitype.</div><div><br></div><div>So in your case Override the Function <b>getListSearchTemplateName() </b>of /layouts/vlayout/uitypes/Base.php</div>
<div>to serve your purpose. </div><div>Please review.</div><div><br></div><div>Regards,</div><div>Rishab</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 4, 2014 at 10:08 PM, Holbok István <span dir="ltr"><<a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Dear vtiger Team,<br>
<br>
As per Rishab's suggestion of 07/22 I have created a custom UIType
(special multiselect picklist) for my custom module.<br>
<br>
I have created:<br>
<b>.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl</b>
and<br>
<b>.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiPicklist.tpl</b>
and did the necessary modification for my purposes.<br>
<br>
I have also created the necessary service files:<br>
<b>.../modules/</b><b><b>CustomModule</b>/uitypes/MyMultipicklist.php</b>
and<br>
<b>.../modules/</b><b><b><b>CustomModule</b></b>/models/Field.php</b>
to serve the template with data.<br>
<br>
The class <b>CustomModule</b><b>_Field_Model</b> extends <b>Vtiger_Field_Model</b>
and class <b>CustomModule</b><b>_MyMultipicklist_UIType</b> extends
<b>Vtiger_Base_UIType</b> .<br>
<br>
With rewriting the display related methods in the above mentioned 2
classes the custom UIType field started work in my custom module.<br>
The listview, the detailvew and the editview also showed the
necessary field data in the necessary display format.<br>
<br>
The listview loaded the template from the file
".../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl"
and the detailview and editview loaded the template from the<br>
".../layouts/vlayout/modules/CustomModule/uitypes/MyMultiPicklist.tpl".<br>
<br>
<big><big><b>But clicking</b></big></big> to the header of the
listview to get sort by some field or search by some field (does not
matter what was the search field) I have received a template error:<br>
<font color="#cc0000"><br>
<big>Unable to load template file '<b>modules/Vtiger/uitypes/MyMultiSelectFieldSearchView.tpl</b>'
in '<b>modules/</b><b><b><b>CustomModule</b></b>/ListViewContents.tpl</b>'</big></font><br>
<br>
Copying file
'.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl'
to the directory
'.../modules/Vtiger/uitypes/MyMultiSelectFieldSearchView.tpl' the
template error resolved.<br>
<br>
It indicates the sort_by and search javascript functions on the
listview screen use a hardcoded path to the templates and did not
use the callback to the CustomModule directory.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<div>-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</font></span></div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>