Page Titles:

Since phpTank loads content dynamically, the normal way of declaring a page title using the title tag in the head tag on each page does not work, simply because the head tag is only located in one file, the layout.html.

So, the way you tell phpTank what pagetitle to display, is by declaring the page title in the functions.php file of either the template or modules you are using. Modules should have the page titles for their pages declared in its functions.php file.

The two methods of declaring page titles are:

  • Through Settings Array.
  • Through a Database.

The first one is fairly simple, while the second one requires a little more doing. Lets have a look at each of them.

Declaring Page Titles through Settings Array:

This is the easy one, in a functions.php file (either located in a module or template), write the following piece of code:

Lets break this down a bit.

  • The first part: $settings->SETvalue - referrs to the method which will update our settings - do not change this.
  • The second part: 'pageTitles' - this tells phpTank to update the pageTitles array in our settings, do not change this either.
  • The third part: 'pageName' is the first you will need to update. This has to be identical to the pagename without the .php extention.
  • For example, if your page is named: contactus.php, you should update 'pageName' to become 'contactus'.
  • The forth part: 'This is the Page Title' is the actual page title that will appear in the header of your targeted page.
  • Remember to type single quotes like so: \' so it's will become it\'s.

Declaring Page Titles through a Database:

Documentation on this will be coming soon.

Functionality currently being tested.