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:
- Create a parser file
Create a php file about.php in the landshop directory with the following contents:
<?
include_once("./include/config.inc");
$STP = new Parser;
$frame = G_TEMPLATES . "/standard.tmpl";
$frags['CONTENT'] = G_TEMPLATES . "/about.tmpl";
$STP->assemble($frame, $frags);
$STP->parseAndEchoPHP();
?>
- 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!
- 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.
- For multi-language sites you will have to extend this example a litte bit:
<?
include_once("./include/config.inc");
$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
$menulang = "en";
include_once("landshop_demo/include/config.inc");
include_once(G_INSTALL_DIR . "/action/getmenu.php");
.
Adjust $menulang and the path to config.inc to your setup.
Now, you have an array called
$landshopmenu with the base menu that looks like this:
print_r($landshopmenu) :
Array
(
[0] => Array
(
[CAT_NAME] => Houses for Sale
[CAT_URL] => http://www.landshop.gr/landshop_demo/action/ls.php?lang=en&action=list&CAT_ID=1
)
[1] => Array
(
[CAT_NAME] => Plots of Land for Sale
[CAT_URL] => http://www.landshop.gr/landshop_demo/action/ls.php?lang=en&action=list&CAT_ID=3
)
[2] => Array
(
[CAT_NAME] => Businesses for Sale
[CAT_URL] => http://www.landshop.gr/landshop_demo/action/ls.php?lang=en&action=list&CAT_ID=5
)
[3] => Array
(
[CAT_NAME] => Contact
[CAT_URL] => http://www.landshop.gr/landshop_demo/action/contact.php?lang=en
)
[4] => Array
(
[CAT_NAME] => See Wishlist
[CAT_URL] => http://www.landshop.gr/landshop_demo/action/ls.php?lang=en&action=see_wishlist
)
)