Hi,

I'm trying to show a (second) views-page when clicking a megarow-link. This second views-page depends on arguments passed by the url (contexual filter). But I'm not sure how to make it all happen.
When setting up the megarow-link, it's actual path becomes: /display_megarow/[argument]/[url]

This means the (second) views-page url should be like: %/[url]
But views doesn't accept an argument in the first segment of the path.

Any help would be very much appreciated.

Thanks,

Mike.

Comments

bojanz’s picture

Status: Active » Fixed

In Commerce Backoffice (Product submodule) we do it by implementing a page callback that is shown in the megarow, and then in that page callback calling views_embed_view and passing the arguments manually.

sportel’s picture

Thanks for your quick repsonse. I'm afraid that diving in to the code (and understanding it) is beyond my skills. So I'll keep looking for another solution.

Mike.

sportel’s picture

I probably can get it to work by changing the code part where the URL is build, making it show the entity_id after the given link-part. But I'm sure that will distroy more than it will accomplish. So maybe I should make it a feature request:

Give users the option in the UI to choose where the entity_id is put in the URL, so it can be used as an argument.

I hope this makes sense.

Mike.

sportel’s picture

Category: support » feature
Artusamak’s picture

This is not planned for the scope of the module for now so i'm afraid that you will have to write some code in order to do it!

Good luck. ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

heyddi’s picture

Here is how I managed to do it:

In the first view (the one with the megarow link, the node ID is the argument I want to use for the other view. I set the path of the link to /something/[node:id].

In the second view, I set the path to something/% and set the argument to use the Content ID in the URL.

So now, clicking on the megarow link gives a link like this: /display_megarow/[argument]/something/[argument] so there is "double" argument.

Simple, but it seems to do the job.

Hope this helps