[SOLVED] Views - Filtering nodes by current user profile field

I have been trying to do this for many days but no luck.

On registration, user has a choice to choose his/her interests - checkboxes with term reference widget.
For example - I have made vocabulary 'Interests' with terms sports, computers, painting etc. Every node is related to terms also.

I need to display only the nodes, that users are interested in. For example, if user checked computers on registration, views have to display only nodes with term computer.

How to attach fields to module-defined node types

I'm just getting started with Drupal 7 module development, and I'm trying to create a module which has a number of custom node types, each of which has various fields attached to it.

I can create the custom node types - no problem there. I can see how to create custom fields using hook_field_info(), if I need to.

How to display a node content as a block?

Hello, i found how to display a block inside a node, but now i'm looking for a way to display a node (which will be a slideshow) as a block, so i can position it on my front page.

Help! I keep getting this error message on the bottom of my new page. And I don't know how to fix it. Does anyone have a clue?

Help! I keep getting this error message on the bottom of my new page. And I don't know how to fix it. Does anyone have a clue how to fix this?

Apply custom page.tpl on nodes and teasers

Hi,

I'm really hoping someone can help me here.

I want to change the background colour of a sidebar for just one section of my Drupal 7 site - so that it displays for both the node and the teaser page.

I've added a content type; mycontenttype.

I've created page--mycontenttype.tpl.php and given the sidebar a different div class.

That didn't apply the content type at all so I added a template.php file to my theme and copied in various suggested bits of php I found on the forum but none seem to apply the page--mycontenttype.tpl.php toboth the node and the teasers..

The following does apply the content type to the node but not the teasers and I don't understand php at all so don't know what to change/add/delete.

function white_preprocess_page(&$vars) {
if (isset($vars['node']->type)) { // We don't want to apply this on taxonomy or view pages
// Splice (2) is based on existing default suggestions. Change it if you need to.
array_splice($vars['theme_hook_suggestions'], -1, 0, 'page__'.$vars['node']->type);
// Get the url_alias and make each item part of an array
$url_alias = drupal_get_path_alias($_GET['q']);
$split_url = explode('/', $url_alias);
// Add the full path template pages
// Insert 2nd to last to allow page--node--[nid] to be last
$cumulative_path = '';
foreach ($split_url as $path) {

Javascript stopped working / $.cookie related error / ModSecurity rules

I am posting this in case it might help others like me who are new to Drupal. When I searched for the information it was hard to find because I didn't know I was looking for a cookie related error. All I knew was that my Javascript functionality didn't work to start with. I hope I am posting this in the right place.

All of the Javascript stopped working on my site for logged in users. The drag and drop didn't work and many other features. It just happened suddenly.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x