Node Backreferencing, best practice

Lets say we have a series of Articles (A-D, for example Like a Film: terminator 1 , 2, 3, 4) and we want each Article to reference the others:

A
B
C
D

Solution 1 would be to use "nodereference" and "cnr" and reference each article to the other.

A -> B and cnr automatically makes it B->A
A->C and cnr automatically makes it C->A
B->C and cnr makes it C->A
A-> D .... D->A
B->D .... D->B

That would mean that one would need to edit nodes twice after creating the Artciles

Solution 2

Node view by views | taxonomy layouts

How can one:

  • Replace the classic node-view of a content type with a specific view? So when clicking on a node, the view shows and not the classic node view.
  • Define a page layout per taxonomy term: when term is a, colour of h2-title is green, when term is b, color of h2-title is red etc...

Thanks!

Declaring Multiple Blocks with hook_block_view

I have multiple blocks that I have defined via hook_block_info that I am able to view and configure in 'blocks'. I am able to create a hooks_block_view function that will allow the first block defined ('v01_inputs') to be viewed on the designated page.

Assuming that I'm looking for a very 'hello world' like statement for each block, such as:

$content = t('Hello World');
$block['subject'] = t('Hi yourself');
$block['content'] = $content;
return $block;

How do I expand hook_block_view now to allow the remaining defined blocks to be viewed?


function v01_block_info() {
$blocks['v01_inputs'] = array (
'info' => t('Vehicle Payment Inputs'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_heading'] = array (
'info' => t('Vehicle Payment Heading'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_results'] = array (
'info' => t('Vehicle Payment Results'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_graph'] = array (
'info' => t('Vehicle Payment Graph'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_table'] = array (
'info' => t('Vehicle Payment Table'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_options'] = array (
'info' => t('Vehicle Payment Options'),
'cache' => DRUPAL_NO_CACHE,
);
return $blocks;
}

function v01_block_view($delta = 'v01_inputs') {

node--blog.tpl.php not working in drupal 7

I tried to create a blog entry specific template and from my understanding all I need to do to override the default node.tpl.php file is to name the blog one node--blog.tpl.php but when I create a blog post it still uses the node.tpl.php file. Is there some step that I am missing?

Media Module File Locations

Hello,

I am using the media module and I have already many assets such as images and audio uploaded to my site however they are in various directory locations such as sites/default/files/images or ../../files/audio as I uploaded them with FTP.

Media does not seem to recognize or display these files when I click on the library button. How can I make the module search or look into those various directories and include them in the library.

Thanks,

Multi-site rewrite

I would like to rewrite a current project using Drupal.

Main things I need to be able to do:

- 3 sites (example.com, example.com/siteA/, example.com/siteB/)
- all with slightly different layouts/navigation/content
- shared login and database
- greater personal information upon registration

Any hints/suggestions as to where to look would be excellent.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x