- Posts: 23
- Thank you received: 0
Adding new field in grid view
- paolo
-
Topic Author
- Offline
- Junior Member
-
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.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13020
- Thank you received: 1688
Dam
Please Log in or Create an account to join the conversation.
- paolo
-
Topic Author
- Offline
- Junior Member
-
- Posts: 23
- Thank you received: 0
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.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13020
- Thank you received: 1688
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
-
- Posts: 23
- Thank you received: 0
I attach the file, can you insert the right code? Then I will change the numebr ID
Thank you
Please Log in or Create an account to join the conversation.
- paolo
-
Topic Author
- Offline
- Junior Member
-
- Posts: 23
- Thank you received: 0

Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13020
- Thank you received: 1688
Dam
Please Log in or Create an account to join the conversation.
- paolo
-
Topic Author
- Offline
- Junior Member
-
- Posts: 23
- Thank you received: 0
thank you
Please Log in or Create an account to join the conversation.
- sti
- Offline
- Platinum Member
-
- Posts: 448
- Thank you received: 2
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
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.
- Mr. Dam
-
- Offline
- Administrator
-
- Posts: 13020
- Thank you received: 1688
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.
Support
Documentation
Information
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.