Jump to content

[SOLVED] moving the editorial_block


spid3r1987

Recommended Posts

where is the code that loads the editorial_block into the center column, as i want to move it from the center column to the header??
not sure if this should be in development or config or somewhere else lol

but re-direction and any help is greatly appreciated :D


with great thanks to PrestaShopic

Link to comment
Share on other sites

Hi
You have to edit "editorial.php" under "moduls>editorial"
Find below code between line:23-28

    public function install()
   {
       if (!parent::install())
           return false;
       return $this->registerHook('home');
   }



Changed it with below:

    public function install()
   {
       if (!parent::install())
           return false;
       return $this->registerHook('header');
   }



Then go to line 244 and find below code:

function hookHome($params)



changed it with:

function hookHeader($params)



Hope this will help you.

Link to comment
Share on other sites

As I understood from you that you want to display editorial block between logo and search block. Then you have to change above codes again.

public function install()
   {
       if (!parent::install())
           return false;
       return $this->registerHook('header');
   } 



Changed it with:

public function install()
   {
       if (!parent::install())
           return false;
       return $this->registerHook('Top');
   } 



Then change

function hookHeader($params) 



to

function hookTop($params) 



then you have to uninstall and install it. Go to back office and change module position by drag and drop under "module>Positions". It will be displayed like in image between "

" if you put your editorial in first position. Then I think we will need to change some css.

36243_H7NeG57m9KW9QhZuVqeQ_t

Link to comment
Share on other sites

That is okey until. Now we have to make some changes in global.css.

Find line 200:

#header_right {
   float: right;
   margin-bottom: 15px;
   text-align: right;
   width: 32%;
}



change it with

#header_right {
   float: right;
   margin-bottom: 15px;
   text-align: left;
   width: 73%;
}



Then go to line 1132:

.editorial_block {
   border-top: 15px none;
}



change it with:

.editorial_block {
   border-top: 15px none;
   float: left;
   width: 55%;
}



Hope that is all.

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

I need to move the editorial block also into my top div, but the code is different in PS4.0 and the instructions above do not work. I am usually decent at coding, but this one is beginning to stump me. Any help appreciated.

 

Did anyone figure this out? I cannot manage to move the editorial block to the top div, it says the module cannot be moved to that Hook (Top of pages)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...