How to add a page into the mini-site

This guide applies only to our self-hosted customers. Hosted with us customers cannot create additional files in the software like this since they don't have access to files.

Adding new page to mini-site is as simple as editing existing one. Let's say we want to add new page Our products, than will contain description of the products in your affiliates can promote.

Creating a new page

we'll create new file products.php in the /affiliate/affiliates directory.  The contents of this file will be:
<?php
    require_once '../scripts/bootstrap.php';

    Gpf_ModuleBase::getStaticPageContent(new Pap_Signup(), 'products.stpl', 'main_static_html_doc.stpl');
?>

Next step is to add the content to this page. We'll create new file products.stpl in the /themes/signup/_common_templates directory. After you have created the file you should edit it from Configuration->Design->Signup page theme in your merchant panel, edit your theme there and search for the file you just created and add the content via the theme editor. The point of using theme editor instead of editing the file directly once you create it is to have the changes saved in the database so you won't loose them when you migrate the software to new location. This file will have contents:
<div class="MainPanel"><div class="ContentLeft"><div class="ContentRight"><div class="MainInfoContent">

<h1>Our products</h1>
<p>This is the list of products you can promote:
<h2>Repair your car e-book</h2>
This e-book describes the best way to repair your car...

<h2>Repair your bike e-book</h2>
This e-book describes the best way to repair your bike...
</p>

<div class="clear"></div></div></div></div></div>


This will display content with header Our products, and list of two example products. The <div> tags used in the beginning and end of the file are used to enclose the text inside our design.
 

Adding the page to the menu

Now that we have new page, we want to add it also to the menu so in Configuration->Design->Signup page theme of your merchant panel edit your theme and search for the following files:
topmenu_logged.stpl - menu when user is logged to affiliate panel
 or
topmenu_notlogged.stpl - menu when user is not logged to affiliate panel.

 or for Dash theme

account_topmenu.stpl

 

In standard installation these files are the same, but if you want, they allow you to have different top menu for affiliate mini-site (user is not logged) and affiliate panel (user is logged in).
In our case, we only have to add one more line with link to our new page, so the file will look like:
<div class="Navigation">
 <div class="NavigationLeft">
  <div class="NavigationRight">
  <ul class="nav">
  <li><a href="index.php">Overview</a></li>
  <li><a href="faq.php">FAQ</a></li>
  <li><a href="products.php">Our products</a></li>
  <li><a href="tour.php">Tour</a></li>
  <li><a href="signup.php">Join</a></li>
  </ul>
  </div>
 </div>
</div>

This will add new menu item to the top menu.

×