

Regards,
John
Code: Select all
function set($key, $value = NULL) {
if (!is_array($key)) {
$this->data[$key] = $value;
} else {
$this->data = array_merge($this->data, $key);
}
}
Code: Select all
function set($key, $value = NULL) {
if (!is_array($key)) {
if ($key == "heading_title") {
$this->data[$key] = "My Store - " . $value;
} else {
$this->data[$key] = $value;
}
} else {
$this->data = array_merge($this->data, $key);
}
}
Hi, i just try your way, but still no have any effect........ sorry for disturb you again....Qphoria wrote: There doesn't appear to be a good way at this point. But there is a way:
Edit your library/template/template.php file and change this:
to this:Code: Select all
function set($key, $value = NULL) { if (!is_array($key)) { $this->data[$key] = $value; } else { $this->data = array_merge($this->data, $key); } }
Change "My Store" to your store nameCode: Select all
function set($key, $value = NULL) { if (!is_array($key)) { if ($key == "heading_title") { $this->data[$key] = "My Store - " . $value; } else { $this->data[$key] = $value; } } else { $this->data = array_merge($this->data, $key); } }
Code: Select all
$template->set('title', $language->get('heading_title'));
Code: Select all
$my_title = 'Top Lamp'; // shown as a constant, but could get a value from wherever you like
$template->set('title', $my_title);
LOL! Whoops wrong title then. I think bruce got it working right for you.johny2k wrote:Dear Qphoria Brother,Qphoria wrote: Ah yea, seems there are also ties into the language file too... I'll see what i can do
I think maybe i got miss something to tell you. Please view the attachment below. I just want to add top lamp word at page title, sorry for confuse you....
Dear Bruce,bruce wrote: the following statement in each controller sets the title on the browser
If the language file values do not suit your purpose, you could set the second parameter using a program variable as followsCode: Select all
$template->set('title', $language->get('heading_title'));
Code: Select all
$my_title = 'Top Lamp'; // shown as a constant, but could get a value from wherever you like $template->set('title', $my_title);
Thanks Bruce, but in catalog/controller/category.php & product.php, i only saw $template->set('title', $category_info['name']); , i try to replace the code you provide - $template->set('title', $language->get('heading_title')); , but it`s nothing happen, it just show as heading_title word.......bruce wrote: probably all in catalog\controller
but certainly...
catalog\controller\category.php
catalog\controller\product.php
Thanks Qphoria & Bruce, i have been solve the problem thank you so much!!!!Qphoria wrote: Get a good editor that does "Replace in files". UltraEdit does it, there are likely a few others.
Do a search for all the spots that make a call to
$template->set('title', $language->get('heading_title'));
and change to
$template->set('title', "Top Lamp - " . $language->get('heading_title'));
Users browsing this forum: No registered users and 1 guest