views

SQL Selecting column names as values

I have a table of data with column names: period, Truck, Car, Boat Where the Columns contain numeric values, and the period column is an identity column having 1 to 48, so there are 48 rows. I would like to massage this table into a format where I have a Name column and a value column as well as the period column eg. period, NameOfV...

Get a node to show up underneath a View's menu item

So I've got a content type of "News" and then a View which shows a list of News nodes as a menu item. Is there any way to highlight the News View in the menu tree when you're viewing a News node? I'm sort of aware of why this doesn't work, and why doing this might be hacky, but there's got to be a way to have a "default" menu item or s...

ASP.NET MVC Newbie: why isn't my model available when creating a strongly-typed view?

I'm starting with ASP.NET MVC, and working with NerdDinner as reference. I did the following: Created a new project Added a couple of tables Created LINQ to SQL for them Created a new controller My Models directory now contains MyModel.dbml, under which I have MyModel.designer.cs, that contains classes for models relating to both of...

Drupal 6 Views 2: PHP Snippets

I am using Views 2 to get information from my Drupal 6 site. After getting the data, I want to use a little PHP to do some calculations that are unavailable through Views + Views calc. What is the best way to go about doing this? I could alter the "Header" or "Footer" text, set the input format to "PHP Code", and try to access the $view...

print_r to get object methods in PHP?

I'm working with Views 2 in Drupal 6, and I am having difficulty finding documentation on the methods of the View object. Is there any PHP function like print_r that outputs methods as well as fields? ...

Problem with nhibernate, Mysql, and Guids

I have a view that flattens out a hierachy of 4 tables to display as a report. within the view it contains the primary keys (Guid) of each of the tables along with some display data. The problem is that the the guids are being returned as varbinary(16) instead of binary(16) and as a result nhibernate throws an error. This would appear...

Javascript link in drupal view

I'm telling the view to display a field with the NID contents. I'm telling it that I wish to "Rewrite the output of this field" and I enter: <a href=”javascript:void(0);” onclick="javascript: approve([nid])" >Approve</a> When viewing the page, all the javascript has been stripped. How do I get views to accept javascript in the link, ...

Drupal 6 Views 2: Setting Date Arguments

Passing uid as an argument works fine with this code: $bouts = views_get_view_result('Results', 'page_1', array($user->uid)); The key line in views_get_view_result that sets arguments is: $view->set_arguments($args); But what about passing date ranges? Also, if something is specified as a filter on a view, is there a way to proram...

ORACLE : Materialized view not working when Using LEFT JOIN

I want to create a MATERIALIZED VIEW from a LEFT JOIN of 2 tables. However the following gives me an error: SELECT field1 FROM table_1 a LEFT JOIN table_2 b ON a.field1=b.field2 ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view However the following works: SELECT field1 FROM tabl...

Flipping views flipping me out!

This should be simple and I am half way there but still having problems. I have 2 xib files which a button in each switches views - all working fine. I want to add some animation. In the first view controller I have the following code which is also working fine... SecondTimerViewController *TimerView = [[SecondTimerViewController alloc]...

How to implement seasonal logos in Drupal?

I know this can probably be done with CCK and a view, and maybe a logo content type. But I was wondering if anybody knows of the BEST way to do the following (perhaps there is a module that does this already): I want SEASONAL displays of my logo. I.e. If I create a CHRISTMAS version of my logo, with for example a a christmas hat in the ...

How to remove nodes from Views in drupal 6

My view holds a list of nodes ranked by rating (vote-API/Fivestar). I wish user to hide nodes they do not wish to see in this view. Can this be done? ...

asp.net mvc views and strongly typed viewdata

I prefer strongly typed viewdata for my asp.net mvc views for various reasons and I actually preferred the Views with codebehinds as they were in the earlier asp.net mvc previews because the codehind was a natural place to define the poco viewdata class as they generally have a 1:1 relationship with the actual view. Are there any way to...

OR operator in Drupal View Filters

I need to implement an OR operator between some filters in a Drupal View. By default, Drupal AND's every filter together. By using hook_views_query_alter(&$view, &$query) I can access the query ( var $query ) , and I can change either : $query->where[0]['type'] to 'OR', or $query->group_operator to 'OR' The problem is however...

Searching views in Drupal

How do you add Search form to your Views in Drupal? Do I have to edit specific view template and add to it form-creating code that posts arguments to my view? Should form's method URL be simply view's URL and form fields the same as view arguments? Is that all the tricks I need to know? ...

Calendar + Events in Drupal 5

"Events" module introduces Event content type, which has such two fields as event_start and event_end. While "Events" module has own calendar, I am need a few different calendars - so I chose Calendar module - which is based on Views. And here goes the problem: I create a new View, select View Type = Calendar, in Fields section listbox ...

Edit method is creating new records, instead of just updating existing ones

My question is: How do I make the edit/update methods for my profiles controller stop creating new records when I edit a profile page? I have a user model and profile model. user has_one :profile. profile belongs_to :user. My routes.rb looks like this: map.resources :users, :has_one => :profile When a visitor to my app creates a use...

Display search query in results of basic search in Rails

I built a basic search form that queries one column in one table of my app. I followed episode 37 Railscast: http://railscasts.com/episodes/37-simple-search-form Here's my problem. I want to display the search query that the user makes in the view that displays the search results. In my app, the search queries the zip code column of ...

Qt model's tree view and table view

I have a list of Product objects ( as rows ), each object has several data fields ( like product id, product family, etc ) - as columns. I managed to create a table model subclassing QAbstractTableModel, and display the datas in a QTableView. What i want is provide a "grouped" view of the model in a tree-like structure. For example I wa...

Programatically get list of MVC Views?

Is there a way to get a list of all the Views defined in an ASP.NET MVC project? Is there a built-in enumeration anywhere or should I be looking toward reflection? ...