User login

Passing an argument from a block to a page with Views 6

Posting an old and embarrassing note, but this may help other hapless googlers find that the answer is right at home in their Views user interface.

Skip to the conclusion for the answer

apologies for a question that feels like support, but it is either too advanced or too simple to be documented anywhere. We have a block view that shows

where can one put custom code to run even if an argument is provided -- code to modify/transform an argument, not just provide a default if none is present?

http://views-help.doc.logrus.com/help/views/argument

http://views.doc.logrus.com/

where can one put custom code to run even if an argument is provided -- code to modify/transform an argument, not just provide a default if none is present?  In Views 1 the whole view could be messed with in the arguments handling, but in Views 2 if the default argument is there no custom code runs...  that I can find.

Checking for quick brain-check here before looking to do it in the API.

Resolution

This is done automatically.

As long as you have enough content in the block to trigger a more link, it will make a more link with the information necessary to pass on variables to the page display of the same view (so you must have both a block and a page display).

Searched words: 
drupal pass argument from block to page view drupal 6 views 2 pass block argument more link to page Views 2 pass relationship as argument

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.