Did a search on this forum with no luck,

If you know of the correct search terms to use or place to look at, please let me know....

What I am trying to do is create a themed page....

I did this....print theme('page', $output); and it returned a page with content, but the problem is it return a normal white page. What I want it to show is the themed page, a page with decorations (not sure of the correct term to use here) on the border of the page.

How do I do that?

BlueDrupal

Comments

bluedrupal’s picture

hoping to get a reply, been looking all over the Drupal API, but tried

theme('block' $output), but does not work, tried
theme('node', $output), doesnt work either.

Anyone know how to do this?

nevets’s picture

Where are you calling the theme function from?

bluedrupal’s picture

I am calling the theme function from a custom module.

Although, I dont think where it is called from matter. If it does, please explain so that I may understand the operation of Drupal better.

nevets’s picture

The place you call theme('page', $ouput) does matter. Without more detail the general outline is in the the menu hook [your_module_menu(...)] you need to define a path to a callback that invokes you function that prints a page.
From your initial post, this function would end with something like
print theme('page', $output);

By the way, you can post the function in question, just include it between <code> and </code> tags.

bluedrupal’s picture

maybe I didnt explain it clearly....

The function does work. I can show content on the page. My module is working as it should. The problem I have is, I dont want the content to show on a simple white background, I want it to show on a themed page with decoration and whatnot, depending on the theme I use.

nevets’s picture

Basically there are two ways you function is called
1) As a drupal hook (or from a Drupal hook)? If this is the case which Drupal hook?
2) Or it is called as menu callback (defined in the menu hook)

Which of these two ways is you function called?
(If not one of these two ways, how is it called?)

bluedrupal’s picture

called the function as menu callback.

nevets’s picture

But are the other pages correctly themed?

Either way, to help more I would need at least a URL so I can see the page in action and preferably the code.

bluedrupal’s picture

So you're basically saying theme() function is the only way?

Is theme() function suppose to be showing pages with "decorations" around the border of the page, and on the background of the page?

By visiting any other page on my site, it shows themed page. But when accessing my module, and calling

print theme('page', $output)

it shows content on simple basic white background, not being themed.

nevets’s picture

While there are other theme functions to output parts of a page a line something like
print theme('page', $output);
is needed to get the complete page.
Normally when I have seen the behaviour you discribe it means I have coded something wrong. It is the reason I have tried to get you to post the code for the module. It makes it much easier to help people when you can see the code.

bluedrupal’s picture

"Terminated request because of suspicious input data."

How do i post the code here. I have tried "code" tags and "?php ?" to no avail.

My code is a large block of code and I am not sure which part I should replace or eliminate so that it will pass the format options.

You say it may be coded wrong...such as?

nevets’s picture

If you like you can send the module (if it has a table the sql would help) and I will take a look at it.
You can contact me through the contact tab (click nevets in this posting).

bluedrupal’s picture

code posted....