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)
-   -   Admin Templates (https://forum.x-cart.com/showthread.php?t=38577)

deffe 03-25-2008 05:45 AM

Admin Templates
 
Does anyone have a blank admin template I can use? I have been trying to figure out how to create a new page in the admin section by using existing pages as templates but I can't seem to figure out what to place in:

Code:

$smarty->assign("main","");

I keep getting no matter what I assign to smarty:

Code:

Page not found!

The requested page does not exist or you are not allowed to access it!   


balinor 03-25-2008 05:55 AM

Re: Admin Templates
 
What, exactly, is it you are trying to achieve?

deffe 03-25-2008 08:05 AM

Re: Admin Templates
 
I'm trying to add a new page to extend the user profile for a client. I've figured out how to add a new link to the dialog box but changing the main section is what is causing issues.

deffe 03-25-2008 11:36 AM

Re: Admin Templates
 
Figured it out. To add a new page within the administration portal and keep the administration template do the following.
  1. Open /skin1/single/home.tpl
  2. Add an else if statement similar to the following
  3. Code:

    {elseif $main eq "test"}{include file="test.tpl"}
  4. Create a new template in /skin/test.tpl
  5. Create a new administration page /admin/test.php and add the following code
  6. Code:

    <?php
    require "./auth.php";
    require $xcart_dir."/include/security.php";

    $smarty->assign("main", "test");
    $smarty->assign("tpldir", $tpldir);

    include $xcart_dir."/modules/gold_display.php";
    func_display("test.tpl",$smarty);
    ?>

  7. The second property in the $smarty->assign method calls the expression assigned in the elseif statements in /skin1/single/home.tpl


All times are GMT -8. The time now is 01:59 PM.

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