X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How can I add a new page to Help? (https://forum.x-cart.com/showthread.php?t=37577)

shangara singh 02-14-2008 09:30 AM

How can I add a new page to Help?
 
Hi -- I want to add a new Testimonials page to the Help box and edit it via languages. What I've done is create a new template testimionials.tpl in the Help dir. I opened it and added:
{* $Id: testimonials.tpl,v 1.9 2005/11/21 12:41:58 max Exp $ *}
<p />
{capture name=dialog}
{$lng.txt_testimonials}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_testimonials content=$smarty.capture.dialog extra='width="100%"'}

I also created a lbl_testimonials and txt_testimonials in languages. I then added following lines to Help.tpl
<a href="help.php?section=testimonials" class="VertMenuItems">{$lng.lbl_testimonials}</a><br />

However, when I click the Testimonials link, the Help Zone opens: http://www.examaids.com/e-cart/home.php

Help most certainly appreciated.

Dongan 02-14-2008 04:03 PM

Re: How can I add a new page to Help?
 
you need to write bit more code in include/help.php

as

if ($section == 'testimonials') {
do this ....
}

I would suggest to create a static page and give a link.

shangara singh 02-14-2008 10:56 PM

Re: How can I add a new page to Help?
 
Thanks, Dongan, for the suggestion. I wanted to use the WYSIWYG editor in languages. Would you, or someone, mind finishing the "if...then" statement?

Dongan 02-14-2008 11:23 PM

Re: How can I add a new page to Help?
 
create a new page called "testimonials.html" under statis pages.

Call this page as pages.php?pageid=x where x is the page id of the static page you create.

shangara singh 02-14-2008 11:53 PM

Re: How can I add a new page to Help?
 
Thanks, Dongan. However, I don't want to create a static page. Is it not possible to create a tpl, populate it via languages and call it via the Help.tpl? If it is, then how?


All times are GMT -8. The time now is 06:01 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.