Jump to content

Recommended Posts

It sure can. Note that the PHP code which generates the page title needs to appear before the <title> tag.

Thanks cyberRobot!

 

<title> tag would be used at the top of the coding part only if the page is static, right?

 

for a dynamic site how it would be used to make a title to a page?

<?php
 
//Insert code here to dynamically set the page title
$pageTitle = "Today is " . date('m-d-Y');
 
?>
<html>
<head>
  <title><?php echo $pageTitle; ?></title>
</head>
<body>

 

Thanks for your reply Psycho!

 

 

Again this would also for a static kind of a page, right? If not, Sorry for the statement :)
 
 
predefined the title statement to show up today's date
 
And will it shoe up for every page?
 
 
How to make title tags unique for every page....
 
Please reply I would like to continue the conversation to learn the new thing...

Are all of your pages built from a single script? It might help if you provide more information on what you're looking to accomplish. It might also help if you have some sample code to show.

 

I think its would be right! title tags are called from a single script.

 

here is a sample code of an websites' header part:

And, I think I got the correct header code!!  ::)

 

<?php   
class ControllerCommonHeader extends Controller {
protected function index() {
$this->data['title'] = $this->document->getTitle();
if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
$this->data['base'] = $this->config->get('config_ssl');
} else {
$this->data['base'] = $this->config->get('config_url');
}
$this->data['description'] = $this->document->getDescription();
$this->data['keywords'] = $this->document->getKeywords();
$this->data['links'] = $this->document->getLinks();
$this->data['styles'] = $this->document->getStyles();
$this->data['scripts'] = $this->document->getScripts();
$this->data['lang'] = $this->language->get('code');
$this->data['direction'] = $this->language->get('direction');
 
and it goes on.....
 
this is the major part needed to work with the title section(i think so!)
 
 
how does the above code works?
 
How to make the code to have a unique manually editable Title tags for all the pages..
 
 
Not only for this particular code.
 
I need to have a designing knowledge as well....  ;D

Are you using OpenCart? If so, perhaps this will help:

http://forum.opencart.com/viewtopic.php?t=45398

 

Its a huge lesson to learn More!

 

Will Have to make some time to implement!!

 

Thanks for the link.

 

Will come back soon for more things.................

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.