This forum is for assistance with theme development.

get CCK field value within 'template.php'

I'm trying to retrieve the value of a CCK node's field (type: textfield) within my template.php file.
I have created a CCK node called banner and added a field: 'banner url' which in the database looks as if it has the name 'field_banner_url'.

I have used the views theme wizard to create a function inside template.php which will call a custom 'views-my-choice-of-name.tpl.php' to display my CCK nodes.

From browsing the web and drupals forums - I wrote this piece of code as an attempt to retrieve the value of the custom field:

How to reference the last item in the primary links in css?

Hi,

I have some primary links going across the top of my page. In between them I have a vertical line separator that I have created by adding a right hand border to ul.primary-links li.

ul.primary-links li {
  margin: 0em;
  border-right:1px solid #00ADEF;
  padding: 1em;
  float:none;
  text-align:center;
  background-image: none;
}

On the last item I do not want to have the right hand border as it is acting as a separator between items.

How to reference the last item in the primary links in css?

Hi,

I have some primary links going across the top of my page. In between them I have a vertical line separator that I have created by adding a right hand border to ul.primary-links li.

ul.primary-links li {
margin: 0em;
border-right:1px solid #00ADEF;
padding: 1em;
float:none;
text-align:center;
background-image: none;
}

On the last item I do not want to have the right hand border as it is acting as a separator between items.

How to print message if no content has been entered?

I have created two content types: Topic and comment.

If a user creates a topic and no comments are entered, I want the system to display a message such as "no content exist in this group". I cannot find a snippet for this.

Any drupalers who know how I can accomplish this?!

Theming the site contact form

I would like to theme the site contact form (simply to strip the menus / blocks to use in a popup). I can do that with a node by creating a page-node-popup.tpl.php and adding /popup to the address. That works fine, but doesn't for the contact form.

Is there any way I can do that or do I have to write a custom form? thanks

Theming the site contact form

I would like to theme the site contact form (simply to strip the menus / blocks to use in a popup). I can do that with a node by creating a page-node-popup.tpl.php and adding /popup to the address. That works fine, but doesn't for the contact form.

Is there any way I can do that or do I have to write a custom form? thanks

Pages

Subscribe with RSS Subscribe to RSS - Theme development