2016-09-05 63 views
0

我使用prestashop 1.6.1.2多層選項。更改標題顏色多中心prestashop

我想更改每個店鋪的標題顏色。

我使用相同的主題,因爲重複不適用於當前主題。

在我加入header.tpl:

if {$shop_name=="myshop"} {literal}<style> .header-top { background-color: #d6644a; }</style>{/literal}{/if} 

,我測試用if {$id-shop=="3"}

,但沒有在頭

回答

0

改變在你header.tpl改變這部分

<body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{else} show-left-column{/if}{if $hide_right_column} hide-right-column{else} show-right-column{/if}{if isset($content_only) && $content_only} content_only{/if} lang_{$lang_iso}"> 

與此包括店名在身體類

<body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} class="{if isset($page_name)}{$page_name|escape:'html':'UTF-8'}{/if}{if isset($shop_name) && Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')} {$shop_name|lower|replace:' ':'_'}{/if}{if isset($body_classes) && $body_classes|@count} {implode value=$body_classes separator=' '}{/if}{if $hide_left_column} hide-left-column{else} show-left-column{/if}{if $hide_right_column} hide-right-column{else} show-right-column{/if}{if isset($content_only) && $content_only} content_only{/if} lang_{$lang_iso}"> 

然後在你的CSS,你可以使用

.my_store .header { 
    background: red; 
} 
+0

我必須讓所有的變化,我加在globla CSS CSS: .shop_pro.header頂{ 背景顏色:紅色重要;} 但沒有什麼變化 –

+0

我有同樣的問題,我清除所有的緩存(的Prestashop和瀏覽器) –

0

更好地與空間的方式

.shop_pro .header-top { 
    background: red; 
} 
+1

是的,我有這個 - \t \t \t \t \t \t

0

更好地之間。這樣,與空間之間

.my_store .header { 
    background: red; 
} 

檢查你頁面源代碼。應該是這樣的,隨着店鋪名稱

<!--[if IE 8]> 
     <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> 
     <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> 
     <![endif]--> 
    </head> 
    <body id="index" class="index my_store hide-left-column hide-right-column lang_en"> 
0

應該是這樣的,隨着店鋪名稱

<body id="index" class="index my_store hide-left-column hide-right-column lang_en">