This forum is for assistance with theme development.

Need Help Adding attribute to Form Tag

Hello,
I am working on a Drupal site that has the Ubercart module installed. In the theme this code:

print $node->content['add_to_cart']["#value"];

is outputting the following HTML code:

style calendar end times

Hello everybody,

I am build a calendar using the 'calendar' module combined with 'views' and the 'date' module.
I'm trying to style my calendar to look like this:

http://www.scoutingoisterwijk.nl/verhuur/aanvraag_kalender

Views Template for image field

I need following HTML structure with Views 3 as template. I make for my first a views template and need here help:

The time has come for raw($field_name)

So, I've got a text field in my Drupal database. It's a raw URL string. I want to use that string to populate some custom whirlygig links on a custom node--contenttype_template.tpl.php. All I need is to print the raw data. Easy, right? Heh.

So naturally, I try print $field_name; . Doesn't work.

So, I read some documentation. I try print render(content['field_name']);. Nope.

I read more documentation. Call in the hubs. He sends me ideas that look like this:
print field_get_items('node', $node, 'field_source_website')[0]['safe_value'];

or

content['field_source_website'][0]['safe_value'];

or

$node->field_source_website->value()

This can not possibly be for real! All I want to do is print the data in the database!

So if I understand these sheets of data correctly, my options are to

  1. Convert my field to a Text Area, with a text formatter that converts links to HTML automatically and print that rendered content with no option for printing the text as a readable user friendly anchor
  2. Use some embarrassing backwards looking markup that looks like print $node->content['field_name']['value']['0]] or something to print out the raw data

Views custom contextual menu covers up the built-in contextual menu.

When I add a contextual link field to my view, I can no longer see the old contextual menu that contained "configure block" and "edit view." I assume that the new one is on top of the old one since it is in the same location. Ideally, I would like the old contextual menu to remain with the new link added inside it. The second best option would be for the new contextual menu to be positioned a half inch lower.

I need more control of the HTML output by the Views module.

Specifically, I want to output:
<img src="[url of the image]" class="[custom class that I choose]" alt="">
Views is outputting:
<img typeof="foaf:Image" src="[url of the image]" width="560" height="395" alt="">

I have Semantic Views installed but I can only control how I wrap the <img>, not the tag itself.

I have looked unsuccessfully for a field that would return just the url of the image.

Any help would be appreciated.

Pages

Subscribe with RSS Subscribe to RSS - Theme development