![]() |
| |||||||
| Support (Version 2) Here is where we provide limited support for version 2. If you are seeking support for version 3 please post in the phpLD 3.0 Support Forum. |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| Join Date: Feb 2006 Posts: 50 | Sorry i now this sounds stuppid but i am trying to add more pages where i am trying to ad the footer and the header but it all gets mesd up any one now where i can get more info or help example i have my directory on {url no longer in service} but i would like to have a page cald {url no longer in service} (for ex) wich has the same header and footer but i can change the content of it please help Last edited by David; 03-26-2008 at 05:36 AM. |
| |
| | #2 |
| Supporter Join Date: Dec 2005 Posts: 487 | Example: creating an 'About Us' page 1. Create a file called about.tpl place in templates folder where main.tpl is etc about.tpl to contain: Code: {capture name="title"} - {l}About{/l}{/capture}
{capture assign="in_page_title"}{l}About{/l}{/capture}
{capture assign="description"}{l}About Us{/l}{/capture}
{include file="header.tpl"}
{include file="top_bar.tpl"}
Your Content Here.
{include file="footer.tpl"} 2. Create a file called about.php, place in root where index.php is etc. about.php to contain: Code: <?php
require_once './init.php';
$path = array ();
$path[] = array ('ID' => '0', 'TITLE' => _L('SITE_NAME'), 'TITLE_URL' => DOC_ROOT, 'DESCRIPTION' => '');
$path[] = array ('ID' => '0', 'TITLE' => _L('About'), 'TITLE_URL' => '', 'DESCRIPTION' => _L('About'));
$tpl->assign($data);
$tpl->assign('path', $path);
echo $tpl->fetch('about.tpl');
?> 3. Call the new page up by placing destination link wherever you want to place it, like this: Code: <a href="{$smarty.const.DOC_ROOT}/about.php">About Us</a> You can use this template process for any other new pages you wish to create. Net. Last edited by Neticus; 05-09-2006 at 02:59 PM. |
| |
| | #3 |
| Join Date: Feb 2006 Posts: 50 | So if i want to put this in diffrent folders for ex i want to put the about page in a folder cald about what do i do then? |
| |
| | #4 | |
| Join Date: Feb 2006 Posts: 50 | Quote:
i tried but all i got is this... Warning: Smarty error: unable to read resource: "about.tpl" in /home/busy/public_html/libs/smarty/Smarty.class.php on line 1088 please help :roll: :roll: :roll: | |
| |
| | #5 | |
| Supporter | Quote:
__________________ DirectoryDump Web Directory | Link Directory | Full of Search Web Directory | Free phpLD Templates | |
| |
| | #6 |
| Join Date: Feb 2006 Posts: 50 | thanks ![]() my problem is that i am trying to greate about 200 diffrent pages so i would like to have them in a sepprate folder is this possible ??? |
| |
| | #7 |
| Join Date: Feb 2006 Posts: 50 | Anyone??? |
| |
| | #8 |
| Supporter Join Date: Mar 2006 Location: USA Posts: 352 | I don't see why not. Just make a folder and do the steps posted above. I think it will work |
| |
| | #9 | |
| Join Date: Feb 2006 Posts: 50 | Quote:
i would like to put the about.tpl and the about.php in the about folder and then have a folder for exampel2 with exampel2.tpl and exampel2.php is this possible? Cheers... Fred | |
| |
| | #10 |
| Supporter Join Date: Dec 2005 Posts: 1,247 | I have not tried this, but I would imagine it should work. Just put your folders in the templates folder. Then in the code for the php file in the root, change the fetch to look like I have it. Code: <?php
require_once './init.php';
$path = array ();
$path[] = array ('ID' => '0', 'TITLE' => _L('Home'), 'TITLE_URL' => DOC_ROOT, 'DESCRIPTION' => '');
$path[] = array ('ID' => '0', 'TITLE' => _L('About'), 'TITLE_URL' => '', 'DESCRIPTION' => _L('About'));
$tpl->assign($data);
$tpl->assign('path', $path);
echo $tpl->fetch('foldername/about.tpl');
?> |
| |
| | #11 |
| Supporter Join Date: May 2006 Posts: 1,178 | This worked like a charm, I just added a page and loaded it up and works flawlessly ![]() Thanks guys |
| |
| | #12 |
| Join Date: Apr 2006 Posts: 139 | EDIT:// nvm, fixed Last edited by ewwharhar; 05-14-2006 at 09:17 PM. |
| |
| | #13 |
| HELP!!!!!!!!!! Fatal error: Smarty error: unable to write to $compile_dir '/home/httpd/vhosts/808.com/httpdocs/ld/temp/templates'. Be sure $compile_dir is writable by the web server user. in /home/httpd/vhosts/808.com/httpdocs/ld/libs/smarty/Smarty.class.php on line 1088 | |
| |
| | #14 |
| Why Did I Get That? I Changed The Codes Like What's Instructed | |
| |
| | #15 |
| Supporter Join Date: Dec 2005 Posts: 487 | @devilishqueen Try deleting the template files from the /temp/templates folder. It's ok you can do this. |
| |
| | #16 |
| {url no longer in service} can anyone help me how to get back to my directory wityhout that error message.. i tried to undo the changes and upload the files back.. but still the samne error.. Last edited by David; 03-26-2008 at 05:36 AM. | |
| |
| | #17 |
| @neticus are u sure? sorry..im just worried now.. :( | |
| |
| | #18 |
| Supporter Join Date: Dec 2005 Posts: 487 | Have you done this in the INSTALL.txt: Upload the files in the archive to your host. Change permissions on the following file and four folders to 777 include/config.php temp/ temp/adodb temp/cache temp/templates If the folders do not exist please create them. |
| |
| | #19 |
| Fatal error: Smarty error: unable to write to $compile_dir '/home/httpd/vhosts/808.com/httpdocs/ld/temp/templates'. Be sure $compile_dir is writable by the web server user. in /home/httpd/vhosts/808.com/httpdocs/ld/libs/smarty/Smarty.class.php on line 1088 i still got the same error message | |
| |
| | #20 |
| ok.. i just changed the permission on the four folders.. so what should i do next? i just need to get the dir back.. without the error messages... :( | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|