precess Template within tempalte

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
ortegaj

precess Template within tempalte

Post by ortegaj »

Maybe the subject is confusing, I hope the explanation isn’t.

I’m trying to create a tabbed admin module with admin preferences.


The default admin contains a tabbed panel and the prefs also have a tabbed panel.

The default admin and admin prefs are .tpl and each tab contains a list formatted with other  .tpl


THE FAILURE:
I’ve tried to include in the pref template some place holders of the start and end of tab headers and tab content.

So in the action.adminpref.php" 

I first populate the adminpref.tpl

Then the tab headers + tabs names + end tab headers

Then each one of tab content with the corresponding start, content, end:

start tab  +  tab content  +  echo $this->ProcessTemplate('pref_TAB_1.tpl');    + end Tab

start tab  +  tab content  +  echo $this->ProcessTemplate('pref_TAB_2.tpl');    + end Tab

start tab  +  tab content  +  echo $this->ProcessTemplate('pref_TAB_3.tpl');    + end Tab


then finally 

$this->ProcessTemplate(' adminpref.tpl');   

THE RESULT
This method of pop / processing is displaying ALL tabs content in the first tab  and the other 2 tabs are empty (well actually the tab functionality is not working)


THE WORKAROUND (not the solution I want)  >:(
I have to remove the  place holders  of the start and end  of tab headers  and tab content in the adminpref.tpl and    change  the  action.adminpref.php  to  populate  and process the  adminpref.tpl    AND then  populate  the tab headers, contents.

So the template is only useful for the title, welcome text and admin navigation.

THE QUESTION
Can I populate templates partially,  start  populating and processing another one  (tabs inside the first template) and then process the first one?


I will apretiate any help.





PS:  I just started to use CMSMS 3 days ago and this thing is awesome and got a lot of potential for almost any module
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: precess Template within tempalte

Post by calguy1000 »

I'd throw some comments into your templates then do a view source on the generated page and see if you think the page is coming out correctly first.

It should be possible to nest tabs, afaik as long as things are done in the correct order.

but it is just a bunch of javascript to do the tabs so you'll have to be careful.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
ortegaj

Re: precess Template within tempalte

Post by ortegaj »

I've tried  that and carefully insert comments one by one.  But still.


I changed the tpl  layout,  the order of the assigns,  i even tried starting from scratch  line by line and it cannot be done.


J
Post Reply

Return to “Developers Discussion”