PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, October 27, 2022

[FIXED] How to add class name to a block in prestashop 1.7

 October 27, 2022     css, html, php, prestashop, prestashop-1.7     No comments   

Issue

I'm currently using prestashop 1.7.4.3, I need to edit the header.tpl file in the _partials. I barely know about this framework.

My problem is:

What I attempted: Tried to add a custom class name for the header logo

<div class="col-md-2 hidden-sm-down hlogo" id="_desktop_logo">
            {if $page.page_name == 'index'}
              <h1>
                <a href="{$urls.base_url}">
                  <img class="logo img-responsive" src="{$shop.logo}" alt="{$shop.name}">
                </a>
              </h1>
            {else}
                <a href="{$urls.base_url}">
                  <img class="logo img-responsive" src="{$shop.logo}" alt="{$shop.name}">
                </a>
            {/if}
        </div>

As you can see I have added hlogo a custom class to the header logo and I tried display:none in my custom.css

My problem is: The newly added class name is not updated in the front office.

Guide me if I made anything wrong!


Solution

As I said before, try clear your cache

To clear cache: Go to Back office Configure/Advanced Parameters/Performance/Clear Cache

You can find the clear cache button in the top right corner in the back office.

Also you can clear cache manually from root_folder/var/cache/dev/smarty/cache

If the problem persists to continue re-check the file you are editing make sure you are editing the correct theme's files



Answered By - Viira
Answer Checked By - Willingham (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing