• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Modern AAC] Using Alters

Paxton

Banned User
Joined
Feb 23, 2008
Messages
4,110
Reaction score
48
Location
London, UK
Many of you might now know about this great feature which comes with Modern AAC.

Basically it is great for designers.

What it does:

You can create different template, for each of sub-pages within one template folder. This is how it works.

Create new folder for example called tutorial in templates folder, and create inside it new file called index.tpl and paste some content into it for example:

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
{$head}

<title>{$title}</title>
	
</head>

<body>
	<h2>This is my template :) </h2>
	
</body>
</html>

Open your config.php and change the value of $config['layout'] to tutorial as this is name of your template folder.

If you go to a website now, you will see:

637853.jpeg


You gonna have this same template on all of the subpages.

And now use of alters!

Create new folder inside your template folder called alters and inside it create another folder called: account_create inside it create file called index.tpl and paste some content into it, for example:

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
{$head}

<title>{$title}</title>
	
</head>

<body>
	<h2>Another template :)</h2>
	
</body>
</html>

And now if u refresh your website, you won't see difference, but if you go to account/create you will see other template

637859.jpeg


Small tip:

If you want to make an alter on all account pages, the call your alter folder account not as an example account_create

This is how it works, it takes the current controller, which is the first text after index.php and method which is the second text. In an example above:

controller: account
method: create

First it looks for alter called account_create because it has the biggest priority, if it doesn't exists it looks for account alter, if it doesn't exists either it will display default template :)

By this you can create subpages like WOW Login, here is an example: https://us.battle.net/login/login.xml?ref=https://www.worldofwarcraft.com/account/&app=wam
 
When I try to add an alter for a p/v page it just shows the original tpl file. I made a folder called p in alters folder and inside it made a folder called v and inside it a folder called gallery and of course made a index.tpl file inside of it but it doesnt work.
Please help me :)
 
When I try to add an alter for a p/v page it just shows the original tpl file. I made a folder called p in alters folder and inside it made a folder called v and inside it a folder called gallery and of course made a index.tpl file inside of it but it doesnt work.
Please help me :)

Same problem, please help.
 
Your folder should be called "p_v" to follow the standard. Also, i'm afraid that it won't work for "pages" in the way you want it.
 
Your folder should be called "p_v" to follow the standard. Also, i'm afraid that it won't work for "pages" in the way you want it.

thanks for saying that! I am sure that a banned member will look at this 1-year-old thread
 
Back
Top