Closed (fixed)
Project:
Custom Page
Version:
6.x-1.12
Component:
Miscellaneous
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2009 at 19:37 UTC
Updated:
25 Aug 2009 at 21:50 UTC
I have successfully created a new-page.tpl, but after searching and reading for a couple hours, I decided to just come and ask.
How do I load a module into the new-page.tpl without using a block.
Thx in advance,
Grizz
Comments
Comment #1
irakli commentedThere's no such thing as "load module into theme" in Drupal. What do you mean?
Comment #2
Grizz commentedI want to insert a module into the tpl without using a block.
Search, menus are modules and can be done with code like
if ($search_box):print $search_box;endif;...so I'm looking to do the same with another module.
Grizz
Comment #3
irakli commented$search_box is not a module it's a variable that a module has declared for use in a specific template (page.tpl.php).
http://api.drupal.org/api/function/hook_prepare/6
Comment #4
Grizz commentedI know now that I shouldn't have used search code. I only used it as an example, as I found out here and in forum.
I just want a module to be used on the page without using a block.
Someday I'll learn the lingo around here, nothing comes in laymen s term anymore.
Comment #5
irakli commentedModules in Drupal can interact with the user-interface in a limited number of ways:
1) Declare a block that can be assigned to a region
2) Declare a variable
3) Provide a tpl that can be inserted.
If module does not expose itself in any of these ways, then custompage must do it for the module. That's what custompage does for menu system via custompage_menu_tile(), because menu is important enough.
I don't believe there's a generic solution for modules that do not actually expose themselves to templates in any of the three ways.
What exactly are you trying to do?
Comment #6
Grizz commented"What exactly are you trying to do?"
Simply not use blocks, just call the modules to the page(s). or hook or something.
I was looking/trying to do this with the tpl's. Someone in forum told me to do it in the template, trying that later.
As it stands now, I've got over 50 block regions on site. It would be so much easier to call the modules from the 8 tpl's, one for each section of site, than trying to keep track of blocks, where there at, coding where to be/not to be, on the block configuration page.
Does this make sense, or am I more confusing.
Grizz
Comment #7
irakli commentedBlocks are good. You should use blocks. But you are right - 50 regions is evil. What can really help you minimize the number of regions is this module: http://drupal.org/project/context which happens to be smoothly integrated with Custompage.
We've built pretty large sites using Custompage and Context using less than 10 regions. Those were comlex enough sites that they would end up requiring much larger number of regions otherwise.
Comment #8
Grizz commentedTHX!
I download Context, groomed my last gray hair, took a sedative, and going to give it a try..lol
Yes, my site was/is large community site, more like large city. I was forced to put it on hiatus because I couldn't keep up with 5,000 hits a day by myself. Then a couple health issues hit me, but I'm not a quitter. I chose Drupal in hopes to my way back bigger and better, but all it's doing is testing my last nerve..lol
I like your site, book marked it, and I'm not to fond of Micro$hit either.
Thx again,
Grizz