How to include a page in index.inc.php

ld
Developer
Depuis New Zealand
Membre depuis oct. 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
Depuis Sweden
Membre depuis mai 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

Vous
Ce site n'utilise aucun cookie ni aucune technologie de suivi tierce. Nous pensons pouvoir faire mieux que les autres et nous nous soucions vraiment de votre vie privée.