This forum is for assistance with theme development.

Floating left instead of right phptemplate: style.css primary link tabs

I'm trying to walk the walk and not just talk the talk. ;-)

This just means I am wrestling with a phptemplate theme to make some adjustments to primary link tabs. I don't want them to float around, over, under, round, and through other header and page elements. So I thought I'd start with getting them to align/float left instead of right the way they do now. Figuring that if they'd stay up against the left margin I could control what was to the left of them and the tabs wouldn't 'crawl' all over elements to the left of them when the page was expanded.

How to theme the list of books

What's the best way to theme the list of books at www.mydrupalwebsite.com/book. I'm using php (.theme) for theming my site, but I don't see any "theme_" function that I can overide in the books module to do this.

Thanks,
Jesse

IE explorer problem

I know that the IE is a pain in the ass respecting css, but I have a problem with a mod of the cleanslate theme. You can view here. The right sidebard eats a little of the forums table. In Mozilla all was fine, but is there any form of solve it for IE?

Thank you, Simon.

What variable is for detect if it is a full story?

Hi,
I need to help with detection in theme under phptemplate engine if I am on list of stories (for example taxonomy/term/2, taxonomy/term/whatever) or if I am on specific story which is stored under this taxonomy (for example node/8).

Thank you.

Variables available to phptemplate, changing title div

I'm using phptemplate for theming. On a page with a certain type of node on it, I would like the title displayed a certain way. However, the node type doesn't seem to be available to me in phptemplate. Is this correct? e.g.

<h2 class="content-title"><?php print $title ?></h2>

I would prefer to have for example:

"Read more" at the end of teaser

I want to put "read more" after the teaser and not together other links. So I lurked this site and after some tries I get the following code (i use php template on drupal 4.6):

<div class="node<?php print ($sticky) ? " sticky" : ""; ?>">
  <?php if ($page == 0): ?>
    <h2><a href="/<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
  <?php endif; ?>
  <?php print $picture ?>
  <div class="info"><?php print $submitted ?> <?php print $terms ?></div>
  <div class="content">
  <?php
    if($main && $node->readmore) {
        $content = "$node->teaser";
        $pos = strrpos ($content, "</p>");
        $content = substr ($content,0,$pos);
        $content .= " ... " . l(t('read more'), "node/$node->nid", array('title' => t('Read the rest of this posting.'), 'class' => 'read-more')) . "</p><hr class=\"incontent\" />";
        if ($node->links) {
        $linkoli=$node->links;
            if ($key=array_keys ($linkoli,(l(t('read more'), "node/$node->nid", array('title' => t('Read the rest of this posting.'), 'class' => 'read-more'))))) unset($linkoli[$key[0]]);
            $links = theme("links", $linkoli);
        }
    print $content;
    }
    else print $content;
   ?>
   </div>

   <?php if ($links): ?>
    <?php if ($picture): ?>
      <br class='clear' />
    <?php endif; ?>
   <div class="links"> &raquo; 
       <?php print $links ?>
   </div>
  <?php endif; ?>
</div>

the only problem I found till now is that "read more" is put in ALL event nodes even if there is nothing else to show (you can look here, the site is in italian "read more" is "leggi tutto").
Cheers, Aress

Pages

Subscribe with RSS Subscribe to RSS - Theme development