Jump to content

Archived

This topic is now archived and is closed to further replies.

caykoylu

Dynamic meta title proplem

Recommended Posts

have a site.But I have a proplem about dynamic title.

Site Title is static.so itsn't change every page.
I want change meta tag dependent in article Title. Namely, I want be article Title = page meta title

index.php code
[code]
..........................................
if (txt_direction == 'LTR')
 {
   echo '<html>';
 }
 else
 {
   echo '<html dir="rtl">';
 }

 echo '<head>
<title>';
 echo title;
 echo '</title>
       <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=';
 echo encoding;
 echo '">
       <META NAME="keywords" CONTENT="';
 echo keywords;
 echo '">
       <META NAME="description" CONTENT="';
 echo description;
 echo '">
</head>
';
 echo bodytagset;
 echo '
';
.........................
[/code]

main.php code

[code]

.................
if ($article1 = mysql_fetch_array ($result1))
           {
             echo '<font color="black"><b>.</b></font> <a href="index.php?id=';
             echo $article1['id'];
             echo '" STYLE="color:';
             echo catlist_title_color;
             echo '; font-family:';
             echo catlist_title_font;
             echo '; font-size:';
             echo catlist_title_font_size;
             echo '; font-weight:';
             echo catlist_title_font_weight;
             echo ';">';
             echo $article1['title'];
             echo '</a><br>';
             continue;
           }
         }

         echo '                        </td>
                       <td valign="top">
                                       ';
...................


[/code]

Share this post


Link to post
Share on other sites
is text_direction supposed to be a variable?

like this
[code=php:0]
if ($txt_direction == 'LTR')[/code]

Share this post


Link to post
Share on other sites
Hi..

I want be meta tag  title $article1['title'] variable.

Sicripts is like http://www.makinahaber.com.

Look at http://www.makinahaber.com

My default meta tag title is Makina Haber .Com.

e.g. I want change be  http://www.makinahaber.com/index.php?id=6 on click .My meta tag Title is my article title e.g. (article title :DELCAM PowerMILL “En iyi yazılım” ödülünü aldı)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.