Views varable scoping

I am working with views and noticed the varables from the unformated.tpl.php dont make it down to the fields.tpl.php.

I just want to do this
foreach (row)
print row
(and then while printing the row check to see if its the last $row in $rows and print something)

Can someone point me in the right direction?

thanks,

jQuery Cycle

I was looking for a Drupal 7 module for jQuery Cycle but couldn't find one. Does anyone have some tips for using jQuery Cycle in Drupal 7?

Need Help Querying Matching Data and Formatting Results

I'm using Drupal 7 with the current mySQL version. I've got a custom profile field table that includes an entity_id (which corresponds to the user id) and a value field, which has one of a number of text strings that users can select as a personal interest. The number of strings a user can select for their profile is variable.

I need to query out the logged in user's list of interests, then query out any users who have any matching interests and their user id. Then I need to pull the user name of each result and list with their matching interests. I have a query/subquery script that partially works:

$subquery = db_select('table')                          
    ->fields('table', array('value'))
    ->condition('table.entity_id', $user->uid, '=');

$query = db_select('table', 't')
    ->fields('p', array('entity_id', 'value'))
    ->condition('value', $subquery, 'IN')
    ->condition('entity_id', $user->uid, '<>')
    ->orderBy('entity_id', 'ASC')
    ->groupBy('entity_id');
$result = $query->execute();

$items = array();
			
	foreach ($result as $num) {
		$items[] = array($num->entity_id);
	}

$block['content'] = theme('item_list', array('items' => $items));

This query returns multiple rows:

  • entity_id value
  • entity_id value
  • entity_id value
  • entity_id value

What I need is:

Access aliases

I have been searching for a while now and can't find what I would think would be an easy answer...

I am trying to access the alias of an item when building a url. I am not exactly sure what to use. Here is my url in a template file:

field_awards_type[0]['value'].'competitions/collaborative?id='.$node->nid.'">

Instead of ?id='.$node->nid at the end of the url I want the alias for the item. What variable do I use to get that?

Thanks for any suggestions.
Shawn

Adding block with a view of a particualar tag

I want to add a block at the bottom of a page that pulls in a particular tag term, and displays a title, and summary like this http://ocduk.org/taxonomy/term/41

So basically, I want to create that view, but as a block and I can't seem to do it. I am trying with views, but what should be simple is appearing quite hard! Any pointers?

Using Taxonomy and Clean URLs to create duplicate content from one entry.

hi,
I'm wondering if anyone can point me in the right direction on this.

I'm developing a Drupal 7 site that delivers some duplicate content over different regions (eg. Chicago, New York) which then (using Theme Key) display using different themes as appropriate.

For my custom content type, I have defined a Taxonomy vocabulary that defines the regions and have managed to integrate it with URL Alias using the replacement pattern: [node:field-region:name]/[node:title].

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x