User login

Views

Use just the body field in the view of a CCK node

This requires theming the view. Views does not know about or provide just the raw body, so you have to theme the view, load the node, and grab the body field.

In your view-....tpl.php:

<?php
 
$fullnode = node_load($node->nid);
print check_markup($fullnode->body, $fullnode->format, FALSE);
?>

THIS HAS SIGNIFICANT PERFORMANCE IMPLICATION FOR MANY NODES WITH MANY FIELDS

How to theme (lots of) views the Agaric Way

I3IVIIVI: now, take a look at the template.php file
(10:20:54 AM) Dan Hak: you took out repeating code?
(10:21:15 AM) I3IVIIVI: yes, exactly
(10:21:22 AM) I3IVIIVI: the code that you knew was repeating
(10:21:35 AM) I3IVIIVI: because you weren't even copying it from the wizard anymore
(10:21:49 AM) I3IVIIVI: you were just changing that one spot :-)
(10:22:11 AM) I3IVIIVI: it was actually harder to refactor than I thought. I shouldn't have done it now

Agaric Question of the Day: Why Does Sticky Need a Descending Sort in Views?

If things are ordered first by what's listed first in sort order, why should Views care whether Sticky is ascending or descending?

And if it does care, why can't it have a sensible default?

Yes, I looked silly in front of a client because I didn't read the not-so-fine print:

Node: Sticky

Sort by whether or not the node is sticky. Choose descending to put sticky nodes at the top.

Theme (lots of) views the Agaric way: Background

Go straight to the useful, how-to information: http://agaricdesign.com/note/how-theme-lots-views-agaric-way

Condensing the wisdom of the wizard

Looking at the code produced by the Views Theme Wizard you can see (especially after being told this at a DrupalCamp in NYC a year or so ago) that the code is essentially the same. Clearly, it could be consolidated and the right template still get called for each view you want to theme.

Putting several nodes or views on a page as tabs

&lt;?php print theme_menu_local_tasks(menu_get_local_tasks()); ?&gt;

“local tasks” are things like view, edit, track. they are usu. styled as tabs. menu_get_local_tasks() gets the menu structure in an array.

Menu Local Tasks - Tutorial?
http://drupal.org/node/122262

mdixoncm - February 24, 2007 - 13:12

2 simple steps to understanding local tasks.

Views titles and text and i18n, a preliminary preface to a dirty hack

Internationalization module (i18n) now supports views in a way-- unfortunately I think it hard wires in the

sure how well that works with the preferred "show current language and no language" setting.

And there's still no goddamned "show in the user's preferred language if available, if not in the default language." That's what we need. There shouldn't even be a conceptual hack of "no language" – content is either in a language or it isn't. But all that's another story.

Theming google map popups to use imagecache with Views and GMap module in Drupal

So you can pass in the imagecache presets namespace directly into your GMap view for use in pop-ups.

I had (apparently) figured this out a while ago but had Dan going through the code print_r'ing views variables to try to figure out where we could intercept the file ID and change the path to imagecache... and the path was already imagecache.

Any imagecache type you create can be chosen for CCK image

Moral of the story, when you're dealing with Views, assume it can be done through the user interface. There is full and amazing Imagecache support of Views.

Agaric Wants: to be able to add taxonomy terms en masse by checking off nodes in a list

2009 Update: http://drupal.org/project/taxonomy_multi_edit (this module was around, just didn't find it until now!)
And http://drupal.org/project/views_bulk_operations has been made far more powerful.

The below is very, very out of date.

Ask Agaric: Views of comments in Drupal 5

how do I make a view that displays only recent comments made on a certain content type?

This is basic views functionality.

Simply filter by node: type to restrict the view to specific content types.

The trick is you have to choose list (or table and possibly other views made possible by the Views Bonus Pack). Then you can select which fields to show: comment subject and time and body and anything else comment related.

how do I make a view that displays only recent comments made on a certain content type?

This is basic views functionality.

Simply filter by node: type to restrict the view to specific content types.

Syndicate content