Can someone please help me out with adding an 'about us' to my phpld directory? I've asked this question on their paid support forum and never got an answer. On top of that, I've found a thread on this topic on their forum, which was from 2 years ago, and the code no longer works with the current version. Thanks
I don't know if there is the functionality of addnind pages from the control panel in the latest versions, but what you can do is copy the source code of a page of your directory, remove all what you don't need and add the about us text. of course you will have to add a link to that page in the menu.
aspidov: I have 3.1.0 running mhamdi: there is no function, but I'm completely baffled as to why they couldn't add such a simple thing. Believe me, I've fought with attempting to add a page, and it never works, these TPL files are so frustrating.
Make a file name about.php with this code: <?php require_once 'init.php'; echo $tpl->fetch('about.tpl'); ?> PHP: and Make a file name about.tpl with this code: {capture name="title"} - {l}About Us{/l}{/capture} {capture assign="in_page_title"}{l}About our directory{/l}{/capture} {capture assign="description"}{l}Information About our directory{/l}{/capture} {include file="header.tpl"} {include file="top_bar.tpl"} {strip} <p> Your Info here </p> {include file="footer.tpl"} {/strip} Code (markup): Place this tpl file under your templates folder and place php file into main root. Not it's easy?
try this in your php file perharps <?php require_once 'init.php'; $path = array (); $path[] = array ('ID' => '0', 'TITLE' => _L(SITE_NAME) , 'TITLE_URL' => DOC_ROOT, 'DESCRIPTION' => SITE_DESC); $path[] = array ('ID' => '0', 'TITLE' => _L('About Us'), 'TITLE_URL' => '' , 'DESCRIPTION' => _L('About Us')); $tpl->assign('path', $path); //Clean whitespace $tpl->load_filter('output', 'trimwhitespace'); //Compress output for faster loading if (COMPRESS_OUTPUT == 1) $tpl->load_filter('output', 'CompressOutput'); //Make output echo $tpl->fetch('about.tpl'); ?> Code (markup): i dont think this code will make any difference with your problem though. you could at least try
Download any of my templates you see at : http://www.freephpldtemplates.sbclansite.com/ , those that come with the contact.php page, you can just modify it and edit the codes and use {include} function to include the pages. I never use the init.php to code any of the pages. Sorry but i cannot access my site right now cause server banned me for too many connections so cannot post the code, so download few packages and read the readme i think i placed some info there. Cheers
thanks! I'll take a look at the code in that template. Hopefully that will do it. Does it require a .TPL file for contact.php?
All you do to .tpl file is place a link on main , and other tpl files to that contact.php page, contact.php page is nothing more than your html or other coding, it just does not use our smarty template anymore. Its like coding ur html page with same theme as ur phpld template, well atleast thats how i do coding to make it easy for me, instead of just coding header and footer tpl files.