Forum Moderators: coopster

Message Too Old, No Replies

Editing the title tag

         

tiger5226

5:51 am on Jan 23, 2008 (gmt 0)

10+ Year Member



Hey guys another question about php template.

the samplepage is:
<snip>

I want to make it so the page title is the product name but the code I keep adding in is not helping me at all. It keeps putting what say character for character. I have tried the following

$xxPrNm='Product Name';
'Product Name'
', $context['Product Name'], '
', $context['$xxPrNm'], '

I was inputing it here on the product detail page

<!-- #BeginEditable "doctitle" -->
<title>I added it here</title>
<!-- #EndEditable -->

I also found this in my sites language file. Am I searching in the right direction. Please help guys :)

$xxPrNm='Product Name';

Mark

[edited by: eelixduppy at 5:58 am (utc) on Jan. 23, 2008]
[edit reason] no URLs, please [/edit]

vincevincevince

12:11 pm on Jan 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is this PHP or Dreamweaver?

pixeline

10:32 pm on Jan 23, 2008 (gmt 0)

10+ Year Member



it seems he's trying to put some php code in a dreamweaver template.

try putting this:


<!-- #BeginEditable "doctitle" -->
<title><?php echo $xxPrNm ;?></title>
<!-- #EndEditable -->

tiger5226

3:07 am on Jan 26, 2008 (gmt 0)

10+ Year Member



I am using a PHP site but I am editing it with Dreamweaver. I hope that answers your question. Sorry I did not get back to you sooner. Im tried putting the code in and it does not work. Any suggestions would be helpful. I will answer sooner...I have just been really busy.

Mark

tiger5226

3:18 am on Jan 26, 2008 (gmt 0)

10+ Year Member



Ok after reasearching some more I found this section of script in my includes file for the product detail page. I found by looking at the "view Source" in my browser and finding the product name in the code the I saw this before it "<div class="detailname">" without quotes. SO I then did search for "detailname" without quotes and found the script in the includes file of product detail page which is the page in question.

<?phpif(@$showproductid==TRUE) print '<div class="detailid"><strong>' . $xxPrId . ':</strong> ' . $rs['pId'] . '</div>';
if(@$showproductsku!='' && $rs['pSKU']!='') print '<div class="detailsku"><strong>' . $showproductsku . ':</strong> ' . $rs['pSKU'] . '</div>';
print '<strong><div class="detailname">' . $rs[getlangid('pName',1)] . $xxDot;
if($alldiscounts!= "") print ' <font color="#FF0000"><span class="discountsapply">' . $xxDsApp . '</span></div></strong><font size="1"><div class="detaildiscounts">' . $alldiscounts . '</div></font></font>'; else print '</div></strong>';
if(@$showinstock==TRUE){ if((int)$rs["pStockByOpts"]==0) print '<div class="detailinstock"><strong>' . $xxInStoc . ':</strong> ' . $rs["pInStock"] . '</div>'; }?>

I hope this can help lead to a resolution. I assume that the below code has something to do with telling me the product name in which I can put some kind of php in the title tags to show the product name as the title.

I tried the following:

<title><?php echo $rs[getlangid('pName',1)] ;?></title>

tiger5226

3:39 am on Jan 27, 2008 (gmt 0)

10+ Year Member



anything?