Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Admin Templates

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-25-2008, 05:45 AM
 
deffe deffe is offline
 

Member
  
Join Date: Oct 2007
Posts: 27
 

Default 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!
__________________
Version 4.3.2
Reply With Quote
  #2  
Old 03-25-2008, 05:55 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Admin Templates

What, exactly, is it you are trying to achieve?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-25-2008, 08:05 AM
 
deffe deffe is offline
 

Member
  
Join Date: Oct 2007
Posts: 27
 

Default 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.
__________________
Version 4.3.2
Reply With Quote
  #4  
Old 03-25-2008, 11:36 AM
 
deffe deffe is offline
 

Member
  
Join Date: Oct 2007
Posts: 27
 

Default 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
__________________
Version 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:53 AM.

   

 
X-Cart forums © 2001-2020