- Posts: 19
- Thank you received: 0
OS Property support center
Echo specificity extra field
- Ivan
- Topic Author
- Offline
- New Member
-
Less
More
9 years 4 months ago - 9 years 4 months ago #74135
by Ivan
Echo specificity extra field was created by Ivan
How do I print a specific field in a template? Now displays all fields.
I found in forum this HelperOspropertyFieldsPrint::showField($field,2);
I write this in this file listing.html.tpl.php.
But why then the field will not be displayed.
Please help me.
I found in forum this HelperOspropertyFieldsPrint::showField($field,2);
I write this in this file listing.html.tpl.php.
But why then the field will not be displayed.
Please help me.
Last edit: 9 years 4 months ago by Ivan.
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13056
- Thank you received: 1696
9 years 4 months ago #74141
by Mr. Dam
Replied by Mr. Dam on topic Echo specificity extra field
Hi Ivan,
You should get data of custom field and pass it into variable: $field
Thanks
Dam
You should get data of custom field and pass it into variable: $field
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Ivan
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
9 years 4 months ago #74142
by Ivan
Replied by Ivan on topic Echo specificity extra field
So ?
<?php
$field = $db->loadObject();
HelperOspropertyFieldsPrint::showField($field,2);
?>
<?php
$field = $db->loadObject();
HelperOspropertyFieldsPrint::showField($field,2);
?>
Please Log in or Create an account to join the conversation.
- Ivan
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
9 years 4 months ago #74171
by Ivan
Replied by Ivan on topic Echo specificity extra field
tell me what am I doing wrong?
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13056
- Thank you received: 1696
9 years 4 months ago #74176
by Mr. Dam
Replied by Mr. Dam on topic Echo specificity extra field
Hi Ivan,
You should have:
XXX is ID of extra field
Thanks
Dam
You should have:
Code:
$db = JFactory::getDbo();
$db->setQuery("Select * from #__osrs_extra_fields where id = 'XXX'");
$fields = $db->loadObject();
....
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Ivan
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
9 years 4 months ago #74181
by Ivan
Replied by Ivan on topic Echo specificity extra field
I for some reason does not appear, maybe I'm doing something wrong?
Please Log in or Create an account to join the conversation.
- Ivan
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 0
9 years 4 months ago #74183
by Ivan
Replied by Ivan on topic Echo specificity extra field
I understand that the $ pid tid is a particular object, but I want it to output field for all objects.
I have no output
I have no output

Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
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.
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.