1
ybouan
Templates in module admin
  • 2004/5/31 21:12

  • ybouan

  • Just popping in

  • Posts: 12

  • Since: 2004/5/13


I'm trying to use templates in the admin for a module.

How could I do this.
Right now I have this but it doesn seem to work.

$xoopsOption['template_main'] = 'template.html';
$xoopsTpl->assign('data' , $data);

Any one know of a module I could use as an example?
I've been using the public side of modules untill now. I guess the footer.php does all the template processing and displaying. What can I do on the admin side?

2
winsion
Re: Templates in module admin
  • 2004/6/1 5:00

  • winsion

  • Just popping in

  • Posts: 55

  • Since: 2003/11/23


For templates not to forget
$modversion['templates'][1]['file'] = 'templates.html';
$modversion['templates'][1]['description'] = 'Your description';


in xoops_version.php

why you look for templates on admin ?

I understand less the remainder of the question. But for header and footer on admin it's :
xoops_cp_header();
xoops_cp_footer();

Good job

3
ajaxbr
Re: Templates in module admin
  • 2004/6/1 5:40

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


I guess the best code/organization examples are in real modules... like those that you get when you download XOOPS or something else from the modules repository

Also check the Module development topic (and perhaps some template stuff) in our beloved wiki.

4
ybouan
Re: Templates in module admin
  • 2004/6/1 8:20

  • ybouan

  • Just popping in

  • Posts: 12

  • Since: 2004/5/13


Quote:
in xoops_version.php

I will look at this thanks...

Quote:
why you look for templates on admin ?

I love having three layers: templates, code, objects. It seems to me to be the most flexible solution. The code manipulates the objects and throws it into the templates... This way most queries are only typed once and I don't have to scan code ten times to find a rogue "echo
;".

Quote:
I guess the best code/organization examples are in real modules... like those that you get when you download XOOPS or something else from the modules repository

Also check the Module development topic (and perhaps some template stuff) in our beloved wiki.

It doesn't seem to be very common in the admin part. I looked through a couple of modules but could not find anything (but maybe I was not looking for the right thing...). As for the wiki and the doc I must say it gives some ideas but is kind of criptic or unhelpfull for most advanced tasks. Unfortunately I don't yet have the knowledge to start contributing to it... and I'm very bad at explaining stuff.

5
ajaxbr
Re: Templates in module admin
  • 2004/6/1 17:38

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Sorry about that, you're 100% right

Quote:
Herko Coomans wrote:
(...)we don't use admin templates(...)


Check the Templates in control panel thread.

Login

Who's Online

358 user(s) are online (232 user(s) are browsing Support Forums)


Members: 0


Guests: 358


more...

Donat-O-Meter

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

Latest GitHub Commits