This forum is for assistance with theme development.

Howto do a theme with two columns story-teaser?

Hi to everyone.

Is there anyone who can tell me how to make an home page with a four column template, left column, right column and two central columns with teaser content.

Normal drupal sites has only one central column. I got frontpage and views modules (4.7) and built up a table with two column in the center (in main content div). How can I tell the theme to put some recent story in the first column and others in the second one?

Is there any other theme developed like that?

I also need to put in some images in the teasers. Any idea?

Thank you

Using images in place of block titles for some (not all) blocks

I fear I have bitten off more than I can chew....

I'm trying to design a theme that uses small banner-like images in place of the usual text titles for (some) blocks that appear in my right sidebar. The catch is I do want some of the titles to be text and I only want these banners to appear only in the right sidebar. How would I go about doing this? I've just been using the default block.tpl.php and I haven't seen anyone attempt something like this with Drupal before.

Convert Garland to 4.7

For all of us who want the great new theme on a production system, here is a quick how-to:

  1. Download the 5.0 beta 1
  2. Copy the folder "garland" from themes to your themes directory of your current drupal 4.7 installation
  3. Disable color module (see snippet 1)
  4. Adapt primary-menu handling (see snippet 2)
  5. Copy block clearing to style.css (see snippet 3)

Snippet 1
Open template.php and comment out line 66 to 68:

65    // Hook into color.module
66/*    if (module_exists('color')) {
67      return _color_page_alter($vars);
68    } */
69  }

Snippet 2
Open page.tpl.php and alter line 46 to 48:

    <?php if (is_array($primary_links)) : ?>
    <ul class="links primary-links">                                 
      <?php foreach ($primary_links as $link): ?>
      <li><?php print t($link)?></li>
      <?php endforeach; //print_r($primary_links)?>
    </ul>
    <?php endif; ?>

Snippet 3
Open style.css and add after line 9:

/*
** Markup free clearing
** Details: http://www.positioniseverything.net/easyclearing.html
*/
.clear-block:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.clear-block {
display: inline-block;
}

/* Hides from IE-mac \*/
* html .clear-block {

tinymce installation with drupla 4.6 on Linux

Hi,

I tried thw hole setup of tinymce on Windows and it worked perfect, but Im surprised it doesnt work on Linux.

Displaying terms

Ok Well I think this is where I should post this. I'm kinda a noob to Drupal and php!

I have this code that works great to show my flexinode-1

[code]

//node type in question
$node_type = "flexinode-1";
//number of columns
$objects_per_row = 3;
//number of results per page
$objects_per_page = 4;
//optional table width setting
//$flexwidth = '100%';

print '<TABLE width="' . $flexwidth . '" cellpadding=0 cellspacing=0><TR>';
$result = pager_query("SELECT n.nid, n.created, n.title FROM {node} n WHERE n.type = '$node_type' ORDER BY created", $objects_per_page);
 
  $i = 0;

while ($node = db_fetch_object($result)) {
            print '<TD valign=top>';
            print node_view(node_load(array('nid' => $node->nid)), 1);
            print '</TD>';
        $i++;
        if ($i == $objects_per_row)
        {
            print '</TR><TR>';
            $i = 0;
        }
}
print '</TD></TR></TABLE>';

//summons the pager at the bottom
print '<TABLE width="' . $flexwidth . '" colspan="' . $objects_per_row . '">
         <TR><TD>'. theme('pager') .'</TD></TR>
       </TABLE>';

[/code]

What I would like it to do is instead of displaying a flexinode, I could use it to display a all my items of a particular term.

I have a category of cars with two terms For sale and Sold. I want to be able to add a new car for sale annd then once it is sold just edit it and change it to sold. I will then display the for sale and sold cars on two different pages.

Pages

Subscribe with RSS Subscribe to RSS - Theme development