OS Property support center

Adding new field in grid view

  • paolo
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 months ago #25996 by paolo
Adding new field in grid view was created by paolo
Hi
I need to add a new field in the grid view for every property as I can do for the deails view.
Is it possible?
Thank you

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #25999 by Mr. Dam
Replied by Mr. Dam on topic Re: Adding new field in grid view
It's possible, i want to know what's the field that you need to show in the grid view
Dam

Please Log in or Create an account to join the conversation.

  • paolo
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 months ago #26062 by paolo
Replied by paolo on topic Re: Adding new field in grid view
It's a brand new field.
In the back end there is the possibilty to create new fields with a new name but they only appear in the property details.
I need it to appear also in the grid view.
thank you

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26064 by Mr. Dam
Replied by Mr. Dam on topic Re: Adding new field in grid view
Hi,
You can edit the file
components > com_osproperty > templates > default > grid.html.tpl.php
and you can show field data by function
HelperOspropertyFieldsPrint::showField($field, $pid);
$pid is Unique number of property
$field field object class
You need to know about Unique number that you want to show, for example : 7
and then you get the field class object by
$db = Jfactory::getDBO();
$db->setQuery("Select * from #__osrs_extra_fields where id = '7'");
$field = $db->loadObject();

Good luck
Dam

Please Log in or Create an account to join the conversation.

  • paolo
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 months ago #26078 by paolo
Replied by paolo on topic Re: Adding new field in grid view
Unfortunately it's a little bit much for me.
I attach the file, can you insert the right code? Then I will change the numebr ID

Thank you
grid.html.tpl.php

Please Log in or Create an account to join the conversation.

  • paolo
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 months ago #26079 by paolo
Replied by paolo on topic Re: Adding new field in grid view
I can't attach it! :(

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26099 by Mr. Dam
Replied by Mr. Dam on topic Re: Adding new field in grid view
Please send email to me: damdt@joomservices.com
Dam

Please Log in or Create an account to join the conversation.

  • paolo
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 months ago #26192 by paolo
Replied by paolo on topic Re: Adding new field in grid view
I sent you the file in e-mail
thank you

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26265 by sti
Replied by sti on topic Re: Adding new field in grid view

paolo wrote: Unfortunately it's a little bit much for me.
I attach the file, can you insert the right code? Then I will change the numebr ID

Thank you
grid.html.tpl.php


you need to rename the file to something like

grid_html_tpl_php.txt
to upload and rename back.

cheers

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26267 by Mr. Dam
Replied by Mr. Dam on topic Re: Adding new field in grid view
Hi Sti,
You can't attach php file. But no worry, i have added sample code for Paoplo.
Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan