Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 319115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:37:55+00:00 2026-05-12T08:37:55+00:00

im using a custom module to create the contents of my homepage at example.com/frontpage.

  • 0

im using a custom module to create the contents of my homepage at example.com/frontpage.

in the module i run a query that gets the data i need, in an array. when i return theme(‘page’, $my_array) i get the “homepage inside the homepage”, ie the default drupal logo and sitename is displayed a second time in the main content area.

what’s the best way to go about this, create a specific tpl.php file, the contents of which should be … ?

i realise its a very general question but in 2 hours of trying things out and reading tutorials ive gotten not very far at all …

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:37:55+00:00Added an answer on May 12, 2026 at 8:37 am

    If I’m understanding your question correctly, all you have to do is return the content without running it through theme_page. theme_page takes your content and wraps it in the site template, so calling it manually in your case is duplicating the template.

    An alternate solution is to have your page’s callback function not return anything, instead printing the output of theme_page. If a callback function returns no text, the site’s template is not included automatically.

    <?php
    
    function mymodule_menu() {
      $items = array();
    
      $items['option1'] = array(
        'title' => 'Front page option #1',
        'access arguments' => array('access content'),
        'page callback' => 'mymodule_option1',
        'type' => MENU_CALLBACK,
      );
    
      $items['option2'] = array(
        'title' => 'Front page option #2',
        'access arguments' => array('access content'),
        'page callback' => 'mymodule_option2',
        'type' => MENU_CALLBACK,
      );
    
      return $items;
    }
    
    function mymodule_option1() {
      // build HTML content here
      return $content;
    }
    
    function mymodule_option2() {
      // build HTML content here
      print theme('page', $content);
      return null;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a custom table using custom module. I have been
I'm trying to create a custom module using Magento's EAV structure and have been
I have created a custom module and am using hook_block to programmatically create some
I am using python struct module to create custom binary files. The file itself
Am using .htaccess to create custom error pages, but the thing is that, it
I am using custom model binder in ASP.NET MVC 2 that looks like this:
I'm in a situation where I think I need to create my own custom
I am using the rather excellent IIS7 Rewrite module (V2), and want to create
Pre-abmle: I am using MakeMeeting module to create/display meeting polls. This module has its
I am trying to create a csv file using python that is truly Excel-compatible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.