Documentation

How to add site content

Most probably you will want to add a lot of static pages to your site, or a contact form, whatever.
There are two ways to achieve this.

Integrate your site into Landshop

You can use the Landshop template system for your static pages as well.
Here is an example for your "about our company" page:
  1. Create a parser file
    Create a php file about.php in the landshop directory with the following contents: <? include_once("./include/config.inc.php"); $STP = new Parser; $frame = G_TEMPLATES . "/standard.tmpl"; $frags['CONTENT'] = G_TEMPLATES . "/about.tmpl"; $STP->assemble($frame, $frags); $STP->parseAndEchoPHP(); ?>
  2. Now, create a template file about.tmpl: <table width="100%" border="1"> <tr> <td>Here goes all the content that we want to display.</td> </tr> <tr> <td>It will all appear in the content section on the right, below the page head.</td> </tr> </table> Do not anything outside of the body - tag here. This is plain content, not more!
  3. repeat this will all pages that you want to display.
    All you do is change the value of $frags['CONTENT'] and the respective file names.
  4. For multi-language sites you will have to extend this example a litte bit: <? include_once("./include/config.inc.php"); $STP = new Parser; $frame = G_TEMPLATES . "/standard.tmpl"; $frags['CONTENT'] = G_TEMPLATES . "/about_".G_LANG.".tmpl"; $STP->assemble($frame, $frags); $STP->parseAndEchoPHP(); ?> No, for each language create a template file, for example about_en.tmpl

Integrate Landshop into your site

This you achieve mainly by integrating the Landshop menu into your site structure. For this purpose we have a file that is called getmenu.php
So, in your page, call define("G_INSTALL_DIR","<PATH-TO-LANDSHOP>"); include_once(G_INSTALL_DIR . "/include/config.inc.php"); include_once(G_INSTALL_DIR."/action/getmenu.php"); . Adjust G_INSTALL_DIR to point to your landshop installation.
This will print the links like this : <a class="landshop" href="http://PATH-TO-LANDSHOP/action/ls.php?lang=en&action=list&CAT_ID=1">Houses for Sale</a> <a class="landshop" href="http://PATH-TO-LANDSHOP/action/ls.php?lang=en&action=list&CAT_ID=3">Plots of Land for Sale</a> <a class="landshop" href="http://PATH-TO-LANDSHOP/action/ls.php?lang=en&action=list&CAT_ID=5">Businesses for Sale</a> <a class="landshop" href="http://PATH-TO-LANDSHOP/action/contact.php?lang=en">Contact</a> <a class="landshop" href="http://PATH-TO-LANDSHOP/action/ls.php?lang=en&action=see_wishlist">See Wishlist</a> To adjust the looks to your site just create a class "landshop" for the link design!