PDA

View Full Version : Including a PHP include on the frontpage


JP
11-03-2005, 01:16 AM
I have searched the forum several times and couldn't find the right solution.

Could somebody please tell me how I can include a Content visible to registered users only..

Thank you so much.

Tim_Myth
11-03-2005, 01:38 AM
phpld uses smarty templates, so simply make your file a tpl file and use this tag:

{include file="myfile.tpl"}

If your file contains php code, you can make it a smart function and call it from tpls or you can insert all the code between {php} tags. The later method is heavily discouraged. To learn more about Smarty, go to http://smarty.php.net/
.

logged
11-03-2005, 10:11 AM
This should work too:
Content visible to registered users only.

JP
11-03-2005, 05:25 PM
Thanks Guys, I will try this, However I think I need to have a .tpl file first and include.

Thank you for the reply.

phil2564
11-04-2005, 04:17 AM
This works fine I use it all over my sites

Content visible to registered users only.