4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: starkeeper on June 29, 2005, 02:16:32 PM

Title: help! include from language dir
Post by: starkeeper on June 29, 2005, 02:16:32 PM
i have a big problem but im not  the biggest programmer and after trying 2 hours, maybe sombody can help me here :wink:
i think its only a small thing - if you know how ;)

thats what i wanna do:

in my template dir i have a include folder for every language:

include_deutsch
include_english
include_spanish

I want to put there files to include like "start.php" which have a table with the main contens for the german startpage.

i want to call this table in the home.html template with something like {lang_starttable} , so that the page is including the start.php from the template/mytemplate/include_deutsch/ folder.

think its easy if you know how - but im more a designer than a programmer ;)
if somebody can tell me what i have to do.. i could help with design :)

thank you

Marco




Title: Re: help! include from language dir
Post by: V@no on June 30, 2005, 01:00:16 AM
since none template files will not be parsed by 4images, u can try include your "start.php" files directly from a template, with something like this:
Code: [Select]
<?php
global $config;
include(
TEMPLATE_PATH."/include_".$config['language_dir']."/start.php");
?>

This method require enable php execution in templates (check includes/constants.php)
http://www.4homepages.de/forum/index.php?topic=4295.0
Title: Re: help! include from language dir
Post by: starkeeper on June 30, 2005, 12:07:15 PM
thank you Vaņo for your quick help, i will take a look at this ;)