1
mschmid
smarty template in admin area
  • 2009/3/30 18:24

  • mschmid

  • Just popping in

  • Posts: 28

  • Since: 2002/9/19


I do try to use the XOOPS admin area. This works fine, but not with smarty enabled. I like to have smarty templates also in the admin area. My understanding is that this is supported with XOOPS version 2.3.3. This version I do have.
Modules reload/refresh in sytem admin is done.
The form does not get loaded!?

=> any hint will help
Markus

xoops_version.php:
---------------
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";
$modversion['templates'][3]['file'] = 'adminmenu.html';
$modversion['templates'][3]['description'] = 'Admin Template';


index.php called from the admin menu:
------------------------------
<?php
  
include '../../../include/cp_header.php';
  
xoops_cp_header();
  
//echo "Aber Hallo";  // for debug only
  
$xoopsOption['template_main'] = "adminmenu.html";
  
$xoopsTpl->assign('itemSuchbegrif',"Cool it works");
  include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";     // get the form creation classes
  
$hidden_form->assign($xoopsTpl);        // pass the form to SMARTY
xoops_cp_footer();


2
kaotik
Re: smarty template in admin area
  • 2009/3/30 18:56

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


require_once '../../../include/cp_header.php';
require_once 
XOOPS_ROOT_PATH '/class/template.php';
if (!isset(
$xoopsTpl)) {$xoopsTpl = new XoopsTpl();}
$xoopsTpl->xoops_setCaching(0);
xoops_cp_header();
$xoopsTpl->display('db:tut_admin_main.html');
xoops_cp_footer();

you can also view my tutorial on how to create admin menus using smarty and Jquery at kaotik.biz

3
mschmid
Re: smarty template in admin area
  • 2009/3/30 19:09

  • mschmid

  • Just popping in

  • Posts: 28

  • Since: 2002/9/19


kaotik
Many thx for your replay. It works the way you describe it.
=> Your Documentation Page is great

Login

Who's Online

52 user(s) are online (29 user(s) are browsing Support Forums)


Members: 0


Guests: 52


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits