HeadHodge
Active member
Hi,
I'm in the "search_results" template and I inserted the following in it:
{xen:helper dump, $results.0}
The partial dump I get is:
object(XenForo_Template_Public)#98 (3) {
["_templateName" protected] => string(20) "search_result_thread"
["_params" protected] => array(22) {
["session"] => array(19) {
["sessionStart"] => int(1403139873)
["ip"] => string(4) "K0�"
["sessionCsrf"] => string(16) "T29jUa0qCoARM9ZD"
["user_id"] => int(692)
(end of snippet)
and further down in the dump I get:
["thread"] => array(78) {
["thread_id"] => int(2796)
["node_id"] => int(71)
["title"] => string(16) "Vanuatu Powdered"
["reply_count"] => int(2)
["view_count"] => int(24)
["user_id"] => int(845)
["username"] => string(11) "Grant Moore"
["post_date"] => int(1403131671)
["sticky"] => int(0)
(end of snippet)
I'm trying to access those two arrays ("session" and "thread"), they all the info I'm looking for and need.
But I just can't figure the correct syntax to access them. I keep getting an error something like: "Template Public is an object and not an array"
Please help and provide an example of how to access these two arrays.
Thanks in advance for your Help!!!!
I'm in the "search_results" template and I inserted the following in it:
{xen:helper dump, $results.0}
The partial dump I get is:
object(XenForo_Template_Public)#98 (3) {
["_templateName" protected] => string(20) "search_result_thread"
["_params" protected] => array(22) {
["session"] => array(19) {
["sessionStart"] => int(1403139873)
["ip"] => string(4) "K0�"
["sessionCsrf"] => string(16) "T29jUa0qCoARM9ZD"
["user_id"] => int(692)
(end of snippet)
and further down in the dump I get:
["thread"] => array(78) {
["thread_id"] => int(2796)
["node_id"] => int(71)
["title"] => string(16) "Vanuatu Powdered"
["reply_count"] => int(2)
["view_count"] => int(24)
["user_id"] => int(845)
["username"] => string(11) "Grant Moore"
["post_date"] => int(1403131671)
["sticky"] => int(0)
(end of snippet)
I'm trying to access those two arrays ("session" and "thread"), they all the info I'm looking for and need.
But I just can't figure the correct syntax to access them. I keep getting an error something like: "Template Public is an object and not an array"
Please help and provide an example of how to access these two arrays.
Thanks in advance for your Help!!!!
Last edited: