0
votes

I'm a joomla noob, and I know how to create a content joomla plugin that prints text just after article title using event listener onContentAfterTitle. Content plugin for Joomla

But I cant find the event listener inside which I should put my code that changes pages title & page description. I have put it inside onContentPrepare & in the onAfterDispatchbut it doesnt work.

Anyone can explain to me how to get it work?

P.S: I want to create the plugin myself to customize as I want

1
You might want to show us some code. Does your plugin install in /plugins/content/ ? docs.joomla.org/Plugin/Events lists onContentAfterTitle for J3.x only and for managing IntroText, you should set document title in onDocumentBeforeDisplay - and it will work also in J2.5Riccardo Zorn
For description do you mean metadata?Elin
@RiccardoZorn, @Elin: It should be a system plugin. I was asking about the html metatag description & title tag.Hakim
@sandeepsolanki I'll try it now.Hakim

1 Answers

0
votes

Thanks for the link, but I've found an answer to my question here:
Create a plugin that changes pages title & meta description

And the event in which to put the code is onBeforeCompileHead, and the function used to alter head is: $document->setHeadData($headData);.