PDA

View Full Version : Dynamic meta tags...Really.


dontrustthisposter
11-16-2006, 04:55 PM
Hello all,

So I've been tweaking a phpld 2.0 directory to automatically generate description and keyword meta tags based on content as you can see by looking at the source here,


http://www.beacondirectory.com/shopping/

It automatically pulls the sites titles making;

<meta name="keywords" content="Array ,Array ,Array ,itx warehouse ,Artery Contemporary Scottish Art Gallery ,Classified Ads - OzFreeOnline.com ,Buy Mobile Phones from Media Mobile ,Dominican Amber Insects ,Classified Ad ,Antique Furnishings and Ornaments ,Christian Framed Art ,">

Snazzy, eh? But The "Array ,Array ,Array ," is supposed to be the subcategories and I don't know how?


In my header I have;


Content visible to registered users only.

Giving the Arrays. What is the solution? thanks

anon
11-16-2006, 05:43 PM
you DO have your {/foreach} at the end right?

chovy
11-16-2006, 06:39 PM
you need to check isarray($categs) and then process those in a loop if so...not sure if you can do a recursive function in smarty or not, probably better to do that in the php and just push out $meta_description to the template.

dontrustthisposter
11-16-2006, 06:58 PM
Content visible to registered users only.

Yes.

Content visible to registered users only.

dontrustthisposter
11-16-2006, 07:01 PM
Content visible to registered users only.

That's really quite greek to me. I've just been hacking around with code snippets with min-medium php knowledge. Made it as far as possible and hoping on some help for a mod that really will help a lot of people.:D

raje_2000_21
02-07-2007, 05:03 AM
Here is code for auto keyword generation

Content visible to registered users only.