×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: keyword and meta

keyword and meta 13 years 4 months ago #13380

  • Andrea Feduzzi
  • Andrea Feduzzi's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
Hi Daniel and everybody,

Is possible insert meta tag and keywords inside the page of th hotspot.
In a few word when I click in "read more" I'll redirect in a specific hotspot's page and i'd like to insert in that page tag and keyword.
Is it possible?

Bye

keyword and meta 13 years 4 months ago #13415

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
No, it is not possible to insert keywords and meta tags. Hm, that doesn't sound as a bad idea, but should it work just from the backend or also from frontend?
Daniel

keyword and meta 13 years 4 months ago #13423

  • Andrea Feduzzi
  • Andrea Feduzzi's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 0
For the frontend.....

when I click in the source page I'd like to see, a the line " <meta name="keywords" content=" , the keyword that I write for that hostpost!

keyword and meta 13 years 12 hours ago #14747

  • Aslan Kayaardi
  • Aslan Kayaardi's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 0
I solved this problem by adding this code into hotspot view in component..

$doc = & JFactory::getDocument();
$doc->setMetaData('description',strip_tags($hotspot));
$doc->setTitle(strip_tags($hotspot));
$doc->setMetaData('generator',"Prowebdesign.uk.com");
$wordChunks = explode(" ", strip_tags($hotspot,""));


for($i = 0; $i setMetaData('keywords',str_replace(array("\r\n", "\r", "\n", "\t"),"",$keywords ));

Only problem with this is creating keywords. because we dont have a field that stores keywords for hotspots what i did is merged description with title and added comma in between each empty space. The keywording is not 100% perfect.

Creating extra field in database for keywords in hotspot items table and adding a input field in admin area will be better idea.
  • Page:
  • 1
Time to create page: 0.126 seconds