This forum is for assistance with theme development.

Undefined index message in custom field

Hi I'm stuck here. Site works OK but I get a lot of error messages in the log:

Notice: Undefined index: empty in include() (line 37 of /var/www/vhosts/johnmartyn.info/httpdocs/sites/all/themes/bigmuff/templates/field--field-tracks.tpl.php).

What I did is add a CCK field to a content type that sums up tracks. It is intended to auto-number, which it does.

Somehow, I seem to miss something. I suppose that I would need to make some statement that the index is empty to begin with. But I don't know how or where.

Why can't I override my menu in Drupal 7 with theme_menu_tree?

I'm working in drupal for the first time and I'm coming along nicely and learning as I go. I need to remove the UL and LI from my menu so I've been doing some research and "MYTHEME_menu_tree_menu_name" was suggested to override the container. As A test I'm trying this in my template.php file:

Best practice laying out page content

Hello,

I'm new to Drupal and have spent the last few weeks reading lots and absorbing as much info as I can.

I'm a front end developer in the process of converting a simple static site I've built into a Drupal site. The static site can be seen here: http://www.lotusfilters.com.au/demo/services.html

What I need help with is the best way to lay out the page INNER CONTENT, and not the outer template. Lets look at just the white background area of the ABOUT and SERVICES pages and ignore the right panel (with the search, quote boxes, etc) as I consider this part of the outer template

So, the body content consists of the following:
- section headings
- section text
- section image

Plus, sections also have columns which include:
- column headings
- column images
- column text

So, what is the best way to approach this? Consider that I do want these pages to be editable by a non-savvy client.

1) Create a single basic page for ABOUT and SERVICES
- paste the entire body contents into these pages via CKEditor
- add styles to CKEditor for the column divs, images, headings, etc
- Edit and add more content, columns, and images in CKEditor and hope it's smart enough to hold it all together?

2) Create new content types for each page, and for the columns

check role in comment.tpl.php

We are moving to a new drupal 7 site from our current D6 version. In the forums we have a feature which allows us to show a small message at avery post posted by an user who is part of a specific user group(role).

Sadly i was not able to alter the code to work under D7, your support would be very helpful.

<?php
 $authAccount = user_load(array('name'=>strip_tags($author)));
  if (in_array('DOC', array_values($authAccount->roles))) {
	print "he is a member";
  }
?>

upgrading Zen 7.5 themes to Zen 7.5 - understanding Sass and Compass

I have been using subthemes built on Zen 7.x-3.x for a couple of years now, with general success and satisfaction. Now my clients understandably would like responsive themes and I'm considering a move to Zen 7.x-5.x, but I am confused after reading various bits of documentation. What I don't understand is the role of Sass and Compass - I am sure this is my fault but may I please ask a few questions?

Using a custom field inside a template view

Hey guys,

I am trying to use a custom field that has been created on the front end with the purposes of filtering articles.

I can deal with the actual filtering in the pre-process but instead of hard-coding the field or fudging it I would like to use any drupal specific functions that are available so that it is as clean as possible.

These are some of the things I have tried.

print render($page['content']['system_main']['field_language']);

echo render(field_view_field('node', $node, 'field_language'));

Pages

Subscribe with RSS Subscribe to RSS - Theme development