[Vtigercrm-developers] Help on Related List

Christophe Humbert chrissc.humbert at gmail.com
Wed Apr 22 20:12:04 GMT 2015


Hello Richard and All

I have never developed in PHP so please excuse my newbee question but I
think I am onto something
in the file you mentionned after the line mentionned below i.e line 36 I
have added some code
{* Assuming most of the related link label would be module name - we
perform dual translation *}
                            {assign var="DETAILVIEWRELATEDLINKLBL" value=
vtranslate($RELATED_LINK->getLabel(),
$RELATED_LINK->getRelatedModuleName());
assign var="ParentRecordMd" value=
Vtiger_Record_Model::getInstanceById($RECORD->getId(),
$MODULE_MODEL->get('name'));
assign var="RelationListVw" value=
Vtiger_RelationListView_Model::getInstance(ParentRecordMd,
$RELATED_LINK->getRelatedModuleName(), $RELATED_LINK->getLabel());
assign var="TotalCountRr" value= RelationListVw->getRelatedEntriesCount();}

But it does not work
I know that $Record->getId() is working as well as $MODULE... and
$RELATED_LINK...

Any further tip would be appreciated

Christophe Humbert



On Mon, Apr 20, 2015 at 12:37 AM, Richard Hills - Technologywise <
richard at tw.co.nz> wrote:

>  layout: layouts/vlayout/modules/Vtiger/DetailViewPostProcess.tpl
> then you can likely adjust getDetailViewRelatedLinks() inside of
> ./modules/Vtiger/models/DetailView.php to find the count and pass it
> through to the template.
>
> Should be relatively easy to do and you could even chuck in a config
> switch and submit it to the project.
>
> This was just a two minute look after seeing the question here, I may be
> missing some better way to do it, but this is at least one way you should
> be able to achieve what you want.
>
> Good luck
>
>
>
> On 19/04/15 21:59, Simone Travaglini wrote:
>
> +1
>
> 2015-04-19 10:46 GMT+02:00 Christophe Humbert <chrissc.humbert at gmail.com>:
>
>>  Anyone...a tip to guide me in the right direction?
>>
>>  Thanks a lot
>>
>>
>>
>>
>>
>> On Fri, Apr 17, 2015 at 10:57 AM, Christophe Humbert <
>> chrissc.humbert at gmail.com> wrote:
>>
>>>  Hello Alan
>>>
>>>  Yes it is present on on-demand version and for me it should not be too
>>> complicated...once you know where to look at..
>>>
>>>  and it is clearly a nice plus..
>>>
>>>
>>> On Fri, Apr 17, 2015 at 10:42 AM, Alan Lord <alanslists at gmail.com>
>>> wrote:
>>>
>>>> On 17/04/15 09:34, Christophe Humbert wrote:
>>>>
>>>>> Hello
>>>>>
>>>>> On community Edition, I would like to add in the right panel where you
>>>>> have all related modules the number of records for each modules....
>>>>>
>>>>
>>>>  I have been asking for that for *years*...
>>>>
>>>> The developers seemed a bit reticent about doing it for performance
>>>> reasons but I noted (I think) that it is possible in the On Demand version.
>>>>
>>>> Al
>>>>
>>>>
>>>> _______________________________________________
>>>> http://www.vtiger.com/
>>>>
>>>
>>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
>
>  --
> Simone Travaglini
> 328 5499846
> Linkedin: Simone Travaglini
>
>
> Rispetta l'ambiente: non stampare questa mail se non ti è veramente
> necessario!
>
>
> _______________________________________________http://www.vtiger.com/
>
>
> --
> Richard Hills
> TechnologyWise Ltd, Tauranga, NZrichard at tw.co.nzwww.technologywise.co.nz
> ph: +64 (0)7 571 1060
> fax: +64 (0)7 571 1061
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150422/9c8dafe5/attachment.html>


More information about the vtigercrm-developers mailing list