PDA

View Full Version : Custom Meta Tags on View-link page, How i did it


ruin7xx
10-18-2006, 12:05 AM
Honestly, i think this script is great. It is pretty customizable depending on how creative you are and how much work your willing to put in. Anyways, i was reading a thread before that mentioned that there isnt any keywords or descriptions in the view-link page meta tags. So heres what i did...

Note: This will work, but please backup your files just incase.

Duplicated header.tpl >> header2.tpl

opened >> view-link.tpl edit and found:

{include file="header.tpl"}

and changed it to {include file="header2.tpl"} (save)...

Then I opened header2.tpl and found:

<meta name="description" content="{$description}" />
<meta name="keywords" content="{$keywords}" />

and replaced it with:

<meta name="description" content="{$link.customdescription}" />
<meta name="keywords" content="{$link.customkeyword}" />(save)

Upload files: header2.tpl and view-link.tpl(updated with new include) to appropriate folders

Then go to the admin panel > manage link fields and create the two fields accordingly(customkeyword and customdescription). Make these custom fields admin view only.

Go to the language editor and update it:
'customdescription' => 'customdescription',
'customkeyword' => 'customkeyword',

Now go to manage links, and click 'edit' for an individual listing. You should see two new fields there. These are your new custom keyword and description fields.

Well, hope i didnt leave anything out, and hopefully someone gets some use out of it!;)

ruin7xx
10-18-2006, 03:50 AM
Also, if you would like your index page meta tags to be different than your category page meta tags, you can use:

Modify header.tpl, and use the 'if category' condition...

<meta name="description" content="{if $categories}index description{else}{$description}{/if}" />
<meta name="keywords" content="{if $categories}index keywords{else}{$keywords}{/if}" />


:)

Michael Hill
10-18-2006, 07:54 AM
Thanks for the mod, ruin7xx!

ruin7xx
10-20-2006, 04:57 AM
welcome !

pandha
10-20-2006, 10:50 AM
does it work in free version?

Michael Hill
10-20-2006, 10:58 AM
Hello, pandha!

Wellcome to Support Forum!

I think no, in any case you can test it, code is simple. But to my mind, in free version you can't manage link's fields.

ciocgun
11-26-2006, 06:35 PM
has anyoine tried in free version?

Holger Veith
11-28-2006, 12:38 AM
Hallo ruin7xx,
after that i will see: Error: Unknown column 'customkeyword' in 'field list'

http://www.bilder-speicher.de/Julita473684.vollbild.html

Holger Veith
11-29-2006, 12:01 AM
@ruin7xx

Go to the language editor and update it:
'customdescription' => 'customdescription',
'customkeyword' => 'customkeyword',

what i have to do - can you explain it?

Michael Hill
11-29-2006, 09:20 AM
Hi, Holger!

Open file language/English.php and add your strings.

Shannon Hutcheson
12-02-2006, 01:27 PM
Thank you for this suggestion.

I can confirm it works perfectly in v2.0 as well.

kamy81
03-20-2007, 03:05 PM
I am using 2.1 version with applied patch 2.1.02
Is this same for this version also and where is the language/English.php

iwebopti
03-20-2007, 06:14 PM
Hi guy's
you seem to be the people to ask this question.

i am trying to add a new pages to the v1.5 ie:company info, company terms, and help text can any of you help me in what to do or where to go to find the help i need.

Thanks in advance

ibs
03-21-2007, 06:59 AM
I am using 2.1 version with applied patch 2.1.02
Is this same for this version also and where is the language/English.php

There is no English.php file the new version has this in integrated into the database, now much much easier. In admin pannel go to COMMON Tab and then to Language Manager... then do your magic there