- Posts: 6
- Thank you received: 0
CPSearch result adding Values from Article Attribs
- hyperx
- Topic Author
- Offline
- New Member
Less
More
9 years 7 months ago #2227
by hyperx
CPSearch result adding Values from Article Attribs was created by hyperx
Hi, is it possible to add values from the Article Attribs (#_content attribs). I am using the T3-Framework and have made an Extra Field for the Articles which act as a subtitle and is being stored in attribs. I have tried accessing this value but keep getting errors:
Notice: Undefined property: CustompropertiesViewSearch::$item in /www/htdocs/w00e40a7/pc-helfer/ego-new/templates/t3_bs3_blank/html/com_customproperties/search/default_item.php on line 13
Notice: Trying to get property of non-object in /www/htdocs/w00e40a7/pc-helfer/ego-new/templates/t3_bs3_blank/html/com_customproperties/search/default_item.php on line 13
Notice: Undefined property: CustompropertiesViewSearch::$item in /www/htdocs/w00e40a7/pc-helfer/ego-new/templates/t3_bs3_blank/html/com_customproperties/search/default_item.php on line 13
Notice: Trying to get property of non-object in /www/htdocs/w00e40a7/pc-helfer/ego-new/templates/t3_bs3_blank/html/com_customproperties/search/default_item.php on line 13
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
9 years 7 months ago #2228
by andrea_4g
Replied by andrea_4g on topic CPSearch result adding Values from Article Attribs
I notice the error originates from a template override (templates/t3_bs3_blank/html/com_customproperties/...).
I have no means to know what's written at line 13 of that files.
(at line 13 of administrator/com_custoproperties/views/search/tmpl/default_item.php, there are no instructions; only a php closing tag)
I have no means to know what's written at line 13 of that files.
(at line 13 of administrator/com_custoproperties/views/search/tmpl/default_item.php, there are no instructions; only a php closing tag)
Please Log in or Create an account to join the conversation.
- hyperx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
9 years 7 months ago - 9 years 7 months ago #2229
by hyperx
Replied by hyperx on topic CPSearch result adding Values from Article Attribs
Yes i am sorry, i forgot to attach the code.
line 13:
line 17-20:
line 13:
Code:
$attribs = new JRegistry($this->item->attribs);
line 17-20:
Code:
<?php if ($attribs->get('untertitel')) : ?>
<span class="item-state state-<?php echo $attribs->get('untertitel') ?>">
<?php echo $attribs->get('untertitel') ?>
</span>
<?php endif ?>
Last edit: 9 years 7 months ago by hyperx.
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
9 years 7 months ago #2230
by andrea_4g
Replied by andrea_4g on topic CPSearch result adding Values from Article Attribs
There's no 'attribs' property in Custom Properties item.
CP results items do have a subset of the properties of the original content item. This subset contains the most common variables (e.g. id, title, introtext, image, created date, access level, ..) found in all the content items CP supports: Joomla articles, K2 items, DocMan docs, jdownloads files, etc
CP results items do have a subset of the properties of the original content item. This subset contains the most common variables (e.g. id, title, introtext, image, created date, access level, ..) found in all the content items CP supports: Joomla articles, K2 items, DocMan docs, jdownloads files, etc
Please Log in or Create an account to join the conversation.
- hyperx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
9 years 7 months ago #2231
by hyperx
Replied by hyperx on topic CPSearch result adding Values from Article Attribs
Is there any easy way to add this? I have no idea on how to do this.
Please Log in or Create an account to join the conversation.
Time to create page: 0.170 seconds