• Home
  • Support
  • Forum
  • Cobalt 8
  • JFactory::getDocument()->setTitle($item->title. ' - '. strip_tags($item->fields_by_id[65]->value));

clowride VIP
Total posts: 1,022
26 Jun 2016 19:59

Hello for my title i use JFactory::getDocument()->setTitle($item->title. ' - '. strip_tags($item->fields_by_id[65]->value));

1) title of record work but value of id 65 is not shown, example : instead of having "title - LOS ANGELES". i HAVE "title - " any idea please ?

2)i would like to display static word before title example : "card : title - LOAD ANGELES", How can i do please ?

Thank you in advance

Best regards

Last Modified: 29 Jun 2016


Sergey
Total posts: 13,748
29 Jun 2016 04:55

clowride 1) title of record work but value of id 65 is not shown, example : instead of having "title - LOS ANGELES". i HAVE "title - " any idea please ?

I do not know. Look if you have something in there. echo field to template output and see if there is something inside.

clowride 2)i would like to display static word before title example : "card : title - LOAD ANGELES", How can i do please ?

You can ass concatination.

JFactory::getDocument()->setTitle($item->title. ' - card: '. strip_tags($item->fields_by_id[65]->value));

clowride VIP
Total posts: 1,022
29 Jun 2016 05:13

thank you Sergey i will try

Powered by Cobalt