Jump to content

Page Name


MihaiAlex

Recommended Posts

Hello,

 

I'm working to creat a new template for my website with help from a module.What I need is to rename page name and link,This is from tutorial:

 

 

 

 the body’s id is module-testmodule-allproducts. Again, this is a pattern: module-*modulename*-*controllername*. This is also the name for this page. It’s pretty ugly, but we have the ability to change it if really needed. Let’s edit our init() method as follows:

 

 

 

2
3
4
5
public function init()
{
    $this->page_name = 'allproducts'; // page_name and body id
    parent::init();
}  

 

Refresh the page. You’ll now notice the body id has changed, reflecting our variable assignment.

 

This code is not working.Can someone help me?

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...