Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

[Solved] Meta description in custom extension
(1 viewing) (1) Guest
Support forum for users using free JoomSEF extensions. These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: [Solved] Meta description in custom extension

[Solved] Meta description in custom extension 15 years, 6 months ago #6591

Hi,

I'm using Joomsef and it just work fine, it's really usefull for SEO in partiticular in url-rewriting.

I'm using specifics components for joomla, i have code myself, so to optimize them, i did some extensions for joomsef and used the extensions examples that comes in the install. So no problem my customs components now get a good url rewriting, but i didn't see any clues to have customs meta tags through joomsef ...

Is there a function in joomsef extension that i can use to dynamically define my meta tags ?
Or event better some kind of tutorial for extensions in joomsef ?

Thanks :)
Last Edit: 15 years, 6 months ago by Snowmanz.

Re:Meta description in custom extension 15 years, 6 months ago #6592

  • denis
Hi Snowmanz,

1. Create a funtion that grabs text that you wanna use as description.

2. in function create(&$uri) call the function like this:
$this->metadesc = $this->getYourDesc($id);


3. At last use this $newUri:
 
$meta['metadesc'] = $this->metadesc;
 
$newUri = JoomSEF::_sefGetLocation($uri, $title, @$task, null, null, @$lang, $nonSefVars, $ignoreVars, $meta);


Best Regards
Last Edit: 15 years, 6 months ago by .

Re:Meta description in custom extension 15 years, 6 months ago #6609

It works fine, thanks a lot.
  • Page:
  • 1
Přihlášení uživatele Prázdný