This forum is for assistance with theme development.

How to only print <fieldset class> if terms is more than 0

I have a statement (shown below) where I'm also printing a fieldset class and a Legend header. It works great, however, the legend header is also printed when terms is 0, which is should not. Any advice?

Help with IF-statements

I cannot get the function below to work. It know it is something do do with one of the two if-statements, but I don't know how to fix it? Can anyone please advice?

    $limit = 6;

    $termlist = taxonomy_node_get_terms($node->nid);
    $terms = array();
    foreach ($termlist as $key => $term) {
      $terms[] = l($term->name, 'taxonomy/term/'. $term->tid);
      if (count($terms[]) == $limit) break;
    }
    echo implode('  ', $terms);
    if (count($termlist) > $limit) echo '...';

New blocks are not appearing in my regions

I'm probably missing something very simple here. Here's what I've done so far:

- Created new directory: /sites/all/themes/plain/
- Added one new file there: page.tpl.php
- Included in that file: $sidebar_left, as well as $title, $content, etc.
- Went to /admin/build/themes and enabled my plain theme
- Went to /admin/build/block and set several blocks to be in the left sidebar
- Those blocks include Navigation, Who's Online, User Login, and a Test Block that I created.

Checking if a Region is empty

I need to be able to check if a region is empty in my theme and vary the structure based on the answer.
What is the code to be able to do that?
Thanks in advance!

Need support for jgmulti 1.2

I am using the theme, jgmulti 1.2, if I remember the name correctly, for this site: www.gnat-tv.org. I have not been able to find this theme on the current list of themes, so I am looking for some support for customizing the theme. Specifically, I am having a problem getting a proper font size in top navigation for Internet Explorer 6 & 7. If anyone knows anything about this theme or where I can find some assistance with this problem, that would be appreciated.

Many thanks,

Luciano

How do I override a theme function in my module from my template.php?

In my custom module I have a function:

function theme_elistingspro_featured_contents($data, $delta){
	$suggestions = array('elistingspro/block-featured', 'elistingspro/block-featured-'.$delta);
	
	return _phptemplate_callback('elistingspro_featured_contents', (array) $data, $suggestions);
}

And I want to optionally override that from my template's template.php

I tried testing this:

Pages

Subscribe with RSS Subscribe to RSS - Theme development