0
votes

I created a view with a page display and a block display.

(1) The page view displays several content "A" with a pager (one full content by "page of pager"). ( in drupalsite/myview )

(2) The block shows the liste of content "A". (put in drupalsite/myview )

This is very simply.

Now I have my page (drupalsite/myview) with : the block view (1) and the view pager (2). When I click on a number X of the pager widget, the view display the content number X (drupalsite/myview?page=X) but when I click on one content in the block view the page load (goto drupalsite/node/X) and display only the content (there is no longer the view with the pager)

How can I do that ? If I click on the item in the block view, the user isn't redirected to the node page. Instead, the view pager refresh, I mean :

In the block view, I click on a item, I go to drupal/myview?page=X (not drupalsite/node/X). The view module can manage that or I must create a custom module ?

1

1 Answers

0
votes

Yes it is possible. 1) Install View Path http://drupal.org/project/views_php 2) Add a Global PHP field 3) In the output Code box put

<?php 
  $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; 
  echo $actual_link;
?>

4) In the 'Rewrite Results' check 'Rewrite the output of this field' and put [title] in the Text box 5) check also 'Output this field as a link' and in link path put [php] 6) Go to your 'Fields' Content: Title and check 'Exclude from display'

In this way, your title of the contents will be replaced by the Global: PHP field which content is the title of the node and which link is the current url.