Post by jadeye » Fri Sep 04, 2015 9:31 pm

Hello
Does any one have an idea where this gets generated:

Code: Select all

<body class="common-home" style="position: relative; min-height: 100%; top: 40px;" cz-shortcut-listen="true">
I know the body class is generated here: catalog/controller/common/header.php

Code: Select all

// For page specific css
		if (isset($this->request->get['route'])) {
			if (isset($this->request->get['product_id'])) {
				$class = '-' . $this->request->get['product_id'];
			} elseif (isset($this->request->get['path'])) {
				$class = '-' . $this->request->get['path'];
			} elseif (isset($this->request->get['manufacturer_id'])) {
				$class = '-' . $this->request->get['manufacturer_id'];
			} else {
				$class = '';
			}

			$data['class'] = str_replace('/', '-', $this->request->get['route']) . $class;
		} else {
			$data['class'] = 'common-home';
		}

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
			return $this->load->view($this->config->get('config_template') . '/template/common/header.tpl', $data);
		} else {
			return $this->load->view('default/template/common/header.tpl', $data);
		}
BUT where does style tag part gets added/ generated??

Thanx

Imagehttp://nwg.co.il/
“Compassion is the basis of morality.”
― Arthur Schopenhauer


New member

Posts

Joined
Sun Jul 15, 2012 12:35 am

Post by masterbeta » Tue Feb 09, 2016 12:51 am

it basically takes the names of the route, product, path, manufacturer, or "empty", otherwise will return "common-home"

so for example, if you hit an information page, it'll return body class="information-information" etc...

the $data['class'] = 'common-home'; is basically "hardcoded" into the file - of course you can change that...

however, i'm still confused on how this is supposed to work overall as in, are we supposed to create individual css classes for each corresponding product/path/route/mfg/empty/home because none of these classes are in the actual stylesheet...

so on my stylesheet, i change the color of the body background - but i see no changes reflected - when i view source of the page, it shows the "body class="whatever page/path i'm on" tag.... so i assume this overrides the default body in stylesheet?

can anyone help out with this? thanks

New member

Posts

Joined
Thu Nov 26, 2015 3:55 pm
Location - Ikaria, Greece

Post by qahar » Tue Feb 09, 2016 1:26 am

jadeye wrote:Hello
Does any one have an idea where this gets generated:

Code: Select all

<body class="common-home" style="position: relative; min-height: 100%; top: 40px;" cz-shortcut-listen="true">
BUT where does style tag part gets added/ generated??

Thanx
Do you test this issue on another browser?
Because cz-shortcut-listen belong to Colorzilla, so possibly it's only happen on your browser.

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia
Who is online

Users browsing this forum: Baidu [Spider] and 45 guests