Print explicit delta in Views (multi value)

Hi guys,

in a content type template I am able to print an explicit delta of a multi value field. For example:

<?php print $content['field_XYZ']['#items']['2']['value']; ?>

Which will print delta 2 of that multi value field.

I am trying to do the same with a multi value field in a views template, but whatever I tried - nothing works. I tried something like this:

<?php print $fields['entity_id']['2']->content; ?>

Display a list of all content types?

How to list a view of all content types that link to their nodes in D7?

We have 6 content types and want to create a 3 columns/2 rows table with an image for every content type. When clicked upon, nodes of that content type become visible.

So basically we need an overview of the content types.
Please advise.

Code referring to javascript disappears when saving html-page in Drupa 7

I use a program [Hot Potatoes] to make "fill in the gaps" exercises for my schools website. With this program I can export an excercise as a webpage. The neccesary javascript is saved in a seperate .js file.
The page is working when viewed in a browser. Now I want to integrate this in the Drupal-website.
I can import the code in a Drupal page, but the reference to the external .js-file disapears when I save the page. I can view the page [nicely integrated] but the Check-button does not work [as it uses javascript].

Second level menu entries?

On my old D5 installations, it's common to have second level menu entries, so I expected a similar behaviour from D7.

I create second level menu entries, but they won't be rendered on my theme. Maybe it's a theme lack, but I've tried all the default themes and none of them will make it.

Can somebody help me? Thank you.

Undo damage result of core bug #1052248

Hi, I made the mistake of creating a text field which was too big, and thus met with the consequences of core bug #1052248: Putting in an overly-large value for a Text field's maximum value breaks things rather horribly.

Now I get the following error on every page:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.field_data_field_text' doesn't exist: SELECT field_data_field_text0.entity_type AS entity_type, field_data_field_text0.entity_id AS entity_id, field_data_field_text0.revision_id AS revision_id, field_data_field_text0.bundle AS bundle FROM {field_data_field_text} field_data_field_text0 WHERE (field_data_field_text0.deleted = :db_condition_placeholder_0) AND (field_data_field_text0.bundle = :db_condition_placeholder_1) LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => test_news ) in field_sql_storage_field_storage_query() (line 569 of /home/sdarm/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).

The field I was trying to create was called "text" - but it never got created. Obviously Drupal thinks it was.

I thought deleting the whole custom content type entry - including that field - would fix the issue. But alas, it has not.

I have duplicated the steps to get to this point on a non-production website. It broke in exactly the same manner with the same error code.

Passing arguments through URL to page node

This question has been posted numerous times but can not find a definitive answer.
I want to be able to pass arguments on page type nodes. This is achievable by doing something like browse?song=X However in keeping with clean urls I need it to be browse/X, such a path creates a 404 not found.
So we use hook_menu to allow for such paths. This is where I am gettin stuck. I can do something like
(I do not need to do anything with the actual agrument variables in hook_menu, I use them elsewhere)

  $items['browse/%'] = array(
    'page callback' => 'browse_callback',
    'page arguments' => array(1),
    'access arguments' => array('access content')
  );
function browse_callback() {
  $node = node_load(3); //the actual NID 
  return node_view($node, $view_mode = 'full', $langcode = NULL);
} //No need to do anything with argument variables - used elsewhere /need to prevent 404

And then use arg() elswhere to obtain variables.
HOWEVER - I dont like the idea of using my own callback to display a node, something of which is already happening. So how can I adjust the following. To do exactly as above. Thanks.


$items['browse/%node'] = array(
'access callback' => 'node_access',
'access arguments' => array('view', '1'),
'page callback' => 'node_page_view',

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x