drupal-views

Views 1: Filter by custom table/field (or using Argument Hand. Code)

Hello, I have a page which should list nodes. The views is called from a locality page (a taxonomy term page). What I need is almost the same as using the Taxonomy: tid in arguments and passing the tid. I can't use the term_node table, as (for other reasons) we have a custom table term_node_hierarchy (with nid and tid only). The table t...

Create link using View Data

How would I approach this problem: Background: I have created a view that displays: Username, FirstName, LastName, Email I have added a dropdown filter to the view display that enables the filter of users based on user terms (a user tagging module), Or interests. That works all good. The problem: I now want to add a email group li...

Using custom, dynamic query with drupal views

By dynamic I mean I want to be able to change the sql query based on user input. Say if this is my custom query, how do I change it so that it toggles between ORDER BY .. Descending and Ascending when a user clicks the column? Is this even possible when you override the query that Views generates? <?php function views_views_pre_execute...

Ignore "The" when sorting a View in Drupal

Hi ! How can I ignore "The" when the user sorts a view in a Drupal site ? ...

drupal preprocess functions

Hi, I am very new to drupal and php, as I am a .net developer. I understand the basic concept of hooks. When it comes to preprocess functions you have $var being passed into functions as an argument. How do you know what variables are available in the $var argument? Also, What preprocess function would I use in the case of custom vie...

Filtering out node by title

Hi - I have a site running in Drupal 6 and I'm using Views to display content from several feeds I am importing. There is a node being created in one of the feeds that I do not want to have shown (or even created at all, if I can help it) & there doesn't appear to be a way to negatively filter out nodes from being displayed by title. ...

How to embed multiple view blocks into a view block and display them conditionally?

I'm trying to embed multiple view blocks into a single view block. However, I want each of the other views displayed only if they meet certain conditions. What is the best way to do this? Im running Drupal 6 with Views 2 and CCK. ...

Trouble with getting a sort to work within a view with views_bonus_pack

Hi, This is my first time using Views in Drupal and am finding that no matter what I do, I can't seem to get my output to sort on any field at all. I'm using the views_bonus_pack to create xml output, but not sure if that matters. I've tried the post date field, the node Id field, the node title field, and... the output is always the ...

Exported filter with preloaded value

Hi, everyone. I defined a profile field for users called "Size" which can take the values "Small", "Normal" and "Big", so it's presented as a combo box. Now I have a Page view with an exposed filter defined over "Size", furthermore the filter is optional so an "Any" value is presented in the combo box. Two questions: When the user en...

Multiple form search in drupal.

I created a website with ads and I would like to have a search form with multiple dropdown fields (i.e. price, type, etc.). The main title search form would be optional. How can I aachieve this using Views? Or maybe it is better to use some module? Any help appreciated. ...

Get term id argument from ubercart catalog

Hi Trying to figure out how to get taxonomy term id from ubercart catalog page. It looks like ubercart catalog system does not support "native" drupal structure "taxonomy/term/id" I've used this snippet as argument for block provided by Views module if (arg(0) == 'taxonomy' && is_numeric(arg(2))){ return arg(2); } else { return FAL...

Drupal, Views module, Group fields in layout

I want to group some fields inside a div or similar HTML tag, for example I'm displaying node's title + node's teaser + node's image, I want to group the title and teaser into one DIV in layout for easier CSS styling. I know a silly method to do it in templates, but I want a quicker and easier method (Drag-and-drop in views edit). A sim...

How do I set up my first view with Draggable Views module?

I'm learning how to use Draggable Views for Drupal 6 for the first time, following this tutorial: http://thedesignspace.net/MT2archives/000666.html . I'm encountering a problem though: in part 4, once I set up the draggable table ( http://thedesignspace.net/MT2archives/000708.html ) the entire preview disappears, showing no table. Switch...

Multiple Styles within one View in Drupal

I am creating a search functionality in Drupal by exposing filters within View. The problem is that I would like to add also a Google Map that display the location of nodes, apart from the search results (node title and some other fields). I can easily do one or the other but I find it difficult to display both search results in a standa...

Add 'rel' Attribute to Drupal Views Link

I am currently using Drupal 7 with the Views module. I have built a photo gallery that is running properly, but I am trying to integrate a lightbox. However, to use a lightbox I need to image links to have the 'rel' attribute. Can anyone please help me with my problem. How do you add the 'rel' attribute in Drupal Views?? ...

Implement javascript in drupal node

In my drupal config I have created a video page, which I'm using to create video titles. I also created a course page, which will be displaying all the video titles available in that course using views and node reference combination. It only displays video title list. Now, Take a look here http://www.lynda.com/home/DisplayCourse.aspx?...

Search 2 fields in a Drupal content type

Hello. I need a simple search form on my Drupal site but I can't figure out the best way to get it done. Basically I have a content type with a couple of different fields and I want my form to search in both the title and the body and then return a list with the title its picture and the stripped body. I have tried with Views and it wo...

modify drupal views output to diplay a facebook like button.

How can I edit views output rows to include a facebook like button and that like statement should take one of the field as parameter and output on facebook as :: abc user likes "content of field" on mywebsite.com ...

Adding custom images to a Calendar view

I am trying to add custom images into Drupal's calendar view by checking 'nid' of a node (or taxonomy term in future). I am writing this custom code in views-view-field--calendar--nid.tpl. The problem is that, what ever is output by views-view-field--calendar--nid.tpl is also inserted into 'id' attribute of div tag. Please see the secon...

How do I get the results of a view and store them in a php var?

I have a custom view that I set up in drupal. What I would like to do is make a function call of some kind, and then assign the results to a php variable. I would like the contents of the view (as opposed to the results of a view export) in this new variable. Is this feasible? If it is a function call, I would appreciate a small example ...