- Messaggi: 6
- Ringraziamenti ricevuti 0
CPSearch result adding Values from Article Attribs
- hyperx
- Autore della discussione
- Offline
- Nuovo Utente
Less
Di più
9 Anni 7 Mesi fa #2227
da hyperx
CPSearch result adding Values from Article Attribs è stato creato da 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
Si prega Accesso o Crea un account a partecipare alla conversazione.
- andrea_4g
- Offline
- Amministratore
Less
Di più
- Messaggi: 1122
- Ringraziamenti ricevuti 163
9 Anni 7 Mesi fa #2228
da andrea_4g
Risposta da andrea_4g al 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)
Si prega Accesso o Crea un account a partecipare alla conversazione.
- hyperx
- Autore della discussione
- Offline
- Nuovo Utente
Less
Di più
- Messaggi: 6
- Ringraziamenti ricevuti 0
9 Anni 7 Mesi fa - 9 Anni 7 Mesi fa #2229
da hyperx
Risposta da hyperx al 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 ?>
Ultima Modifica 9 Anni 7 Mesi fa da hyperx.
Si prega Accesso o Crea un account a partecipare alla conversazione.
- andrea_4g
- Offline
- Amministratore
Less
Di più
- Messaggi: 1122
- Ringraziamenti ricevuti 163
9 Anni 7 Mesi fa #2230
da andrea_4g
Risposta da andrea_4g al 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
Si prega Accesso o Crea un account a partecipare alla conversazione.
- hyperx
- Autore della discussione
- Offline
- Nuovo Utente
Less
Di più
- Messaggi: 6
- Ringraziamenti ricevuti 0
9 Anni 7 Mesi fa #2231
da hyperx
Risposta da hyperx al 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.
Si prega Accesso o Crea un account a partecipare alla conversazione.
Tempo creazione pagina: 0.138 secondi