How to include a page in index.inc.php

ld
Developer
Fra New Zealand
Member since okt. 2024
ld

I have found a lot of questions on the forum darting around the topic and everybody settling on regularly hacking the template files to achieve it.

So far, unable to find any litecart functions to correctly/efficiently achieve the following...

using the admin console, add an information page and call it home. This page is to be included on the home page (index.inc.php)

so on index.inc.php you would use something like<?php include 'home.php'; ?> (obviously this wouldn't work as it is not an actual page, it is a database object.

Therefore - in keeping within Litecart functions, I thought there would be a function that went something like...
<?php echo $page_id['1']; ?>
However I can't find any such function. https://www.litecart.net/cs/wiki/functions

Any one have any clues?

(P.S. reasons people may want something crazy like this... so the person operating the admin panel can change their own data on the homepage)

tim
Founder
Fra Sweden
Member since maj 2013
tim

In php it's..

include 'path/to/script.php'; // Executes code

or

echo file_get_contents('path/to/document.html'); // Outputs the contents of the file

Du
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.