Jump to content


Photo

Dynamic meta title proplem


  • Please log in to reply
3 replies to this topic

#1 caykoylu

caykoylu
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 04 August 2006 - 07:16 AM

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
..........................................
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 ' 
'; 
.........................

main.php 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"> 
                                        '; 
...................




#2 SieRobin

SieRobin
  • Members
  • PipPipPip
  • Advanced Member
  • 212 posts
  • LocationNew Jersey

Posted 04 August 2006 - 07:24 AM

I don't really understand what you're trying to do.

#3 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 04 August 2006 - 07:32 AM

is text_direction supposed to be a variable?

like this
if ($txt_direction == 'LTR')

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#4 caykoylu

caykoylu
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 04 August 2006 - 07:39 AM

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.makinahab.../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ı)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users