How to add context-dependent content to the view's output?

Events happening in the community are now at Drupal community events on www.drupal.org.
kirilius's picture

I have a view that displays (let's say) a grid (gallery) of pictures related to a given node X. This view has a parameter that's passed through the URL: http://mysite/node/$arg1/pictures. It works fine but I would like to be able to make a few changes to the output:

1) Change the title so that it says something like "Node X pictures", where Node X is the title of the node with ID that's passed through the parameter $arg1.

2) Add a link at the somewhere on the page that says "Start a slideshow". I have the slideshow view ready. Let's say it's URL is http://mysite/node/$arg1/slideshow

3) Add a link to page that will say "Add a new picture to node X". Again I have the URL for the picture-creation page http://mysite/node/$arg1/add_picture and

(2) and (3) are basically the same: I need to add a link and dynamically construct the URL passing the same parameter that's passed to the current view.

The final result should look something like this:

Node X pictures

Pic1 Pic2 Pic3
Pic4 Pic5 Pic6

Start a slideshow (link dependent on the $arg1)

Add a new picture (link dependent on the $arg1)

What is the best way of dynamically using the parameters' values to modify the view output based on that?

Thanks for your help!

Comments

Also how can I change the

kirilius's picture

Also how can I change the text of the "more"-link in a block-view? Let's say I want to change it to "Show more pictures" instead of the plain "more"?

Any help please? At least

kirilius's picture

Any help please? At least can you give me a starting point and a general direction?

Panels 2 will help you

amitaibu's picture
  1. Panels 2 will help you structure your sentences 'start slide from node %arg1'.
  2. Views bonous pack - has a grid option.
  3. Add a picture to node x - you can theme your link to include %arg1.

Thank you, Alright, I will

kirilius's picture

Thank you,

Alright, I will try theming my view and add those links at the bottom (also using %arg1). How about adding some title text that includes data taken outside of the current view (parent node's name)?

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: