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 6951435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:13:10+00:00 2026-05-27T14:13:10+00:00

I need to create content that only outputs what I entered, no layout, no

  • 0

I need to create content that only outputs what I entered, no layout, no comments, blocks, etc.

If I could implement a custom content type that used blank templates that might work, but I’ve been unable to make it work so far as overriding the themes seems to replace everything site-wide. So, skipping that, is there a simple way I’m not aware of, to just output what I type in the content’s body, with no layout/blocks/comments,etc.

Is it possible via a custom module to add a custom field at the bottom, and then during the process_page() hook, ignore the theming and layout and just output the content?

Please don’t suggest “Views” as it’s not stable.

Some example use cases:

A page that’s a PHP type, and it’s simply a script that I don’t want layout as an example.

Or if I have some json data to return.

Or if I want to toss up a all-in-one page with it’s own theme.

Any suggestions?

  • 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-27T14:13:11+00:00Added an answer on May 27, 2026 at 2:13 pm

    I am working on a module that will do this and also integrate with views so you can set a view to be “theme-less” as well. I have it so that it will create a checkbox on a node form that you can specify the node to be theme-less node. Once that is checked, the node will be displayed with no theme (the content only, no title).

    It’s a little hackish, but it works preliminarily. I will be fleshing this out as I have need for it and I will likely also integrate it with views over time.

    timeless.install

    <?php
    
    /**
     * themeless.install
     * defines our schema for flagging nodes as being themeless or not.
     */
    
    function themeless_schema() {
      $schema['themeless_node'] = array(
        'description' => 'Keeps track of which nodes are themeless.',
        'fields' => array(
          'nid' => array(
            'description' => 'The node id of a themeless node',
            'type' => 'int',
            'unsigned' => TRUE,
            'not null' => TRUE,
          ),
        ),
        'primary_key' => array('nid'),
      );
      return $schema;
    }
    
    function themeless_enable() {
      if (db_table_exists('themeless_node') == FALSE) {
        drupal_install_schema('themeless');
      }
    }
    
    function themeless_uninstall() {
      drupal_uninstall_schema('themeless');
    }
    

    timeless.module

    function themeless_process(&$variables, $hook) {
      if ($hook == 'page') {
        if (isset($variables['page']['content']['system_main']['nodes']) && is_array($variables['page']['content']['system_main']['nodes'])) {
    
          $node = $variables['page']['content']['system_main']['nodes'];
          $nodes = array_keys($node);
          $result = db_query("SELECT t.nid AS themeless, n.promote
                                 FROM {themeless_node} t, {node} n
                                 WHERE t.nid=:nid
                                   AND n.nid=t.nid",
                                 array('nid' => $nodes[0]));
          $tdata = $result->fetchObject();      
          if (isset($tdata->themeless) && $tdata->themeless > 0 && $tdata->promote != 1) {
            if ($node[$nodes[0]]['body']['#object']->body['und'][0]['format'] == 'php_code') {
              print $node[$nodes[0]]['body'][0]['#markup'];
            } else {
              print $node[$nodes[0]]['body']['#object']->body['und'][0]['value'];
            }
            exit();
          }
        }
      }
    }
    
    function themeless_form_alter(&$form, &$form_state, $form_id) {
    
      $parts = explode('_',$form_id);
      $form_type = $parts[count($parts)-1].'_'.$parts[count($parts)-2];
      $themeless = '';
    
      if ($form_type == 'form_node') {
        if (isset($form_state['node']->nid) && $form_state['node']->nid) {
          $themeless = db_query("SELECT COUNT(*) AS themeless
                                 FROM {themeless_node}
                                 WHERE nid=:nid",
                                 array('nid' => $form_state['node']->nid))->fetchField();
        }
        $checked = ($themeless == 1) ? 'checked' : '';
        $form['themeless'] = array(
          '#type' => 'fieldset',
          '#title' => t('Themeless Node'),
          '#weight' => 5,
          '#collapsible' => TRUE,
          '#collapsed' => TRUE,
        );
        $form['themeless']['themeless_node'] = array(
          '#type' => 'checkbox',
          '#title' => 'Themeless Node',
          '#description' => 'This theme will be displayed without any wrapper themes.',
          '#weight' => 100,
          '#default_value' => $themeless,
        );
      }
    }
    
    function themeless_node_insert($node) {
      $result = db_query("INSERT INTO {themeless_node} (nid)
                          VALUES( :nid )",array('nid' => $node->nid));
    }
    
    function themeless_node_update($node) {
      if ($node->themeless_node == 1) {
        if (db_query("SELECT COUNT(*) AS themeless
                      FROM {themeless_node}
                      WHERE nid=:nid",
                      array('nid' => $node->nid))->fetchField() != 1) {
          $result = db_query("INSERT INTO {themeless_node} (nid)
                              VALUES( :nid )",array('nid' => $node->nid));
        }
      } else {
        $result = db_query("DELETE FROM {themeless_node}
                            WHERE nid=:nid",array('nid' => $node->nid));
      }
    }
    

    timeless.info

    name = Themeless
    description = Gives the option to a node to have a themeless display or displayed without the various theme templates native to Drupal.
    core = 7.x
    version = 7.x-1.0dev
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a backup of a SQL Server 2005 Database that's only
Anybody please give some useful links on this topic.i need to create a content
I need create custom dialog and put JPanel into it. Is it possible?
Need to create a custom DNS name server using C which will check against
I need to create an XML schema that looks something like this: <xs:element name=wrapperElement>
I'm trying to make a web page that only has content within the page
I need to create a horizontal scrollbar that will control a the scrolling inside
If you had classes like Page, News, etc. that describe content items and you
My content table looks like ( contentID , title , created ). I need
i need create an email list sending to many emails. what is best solution

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.