Hi

I'm wondering if its possible to pass arguments. I got a couple of blocks made with views and they work fine on default page but seems to not work at on view mode pages. (I'm talking about contextual filters)

Is there a reason for this or is there a workaround?

Comments

rballou’s picture

I haven't had time to look at this, but I would also recommend looking at the hooks to see if they would be helpful at all. https://github.com/robballou/view_mode_page/blob/7.x-1.x/view_mode_page....

I'll try to look at this specifically soon. I assume this is a block containing a View that uses the NID as a contextual filter?

Strutsagget’s picture

Hi yeah exactly i need the nid for a viewblock inside the viewmode. So far i use display suit and ?q=myviewmodename to do it but i rather have a real path for seo purposes. Ill try take a look when my current jobs dries up a bit... and see if i can help with a patch or if you beet me to the punch :)

Thx for replying!

Strutsagget’s picture

Issue summary: View changes

Adding more explaination

ThuleNB’s picture

Hi there,

I am having the same issue (at least I think that's what the original poster meant).

I use VMP in order to display two additional view modes (also because of SEO reasons):

  • Original node path uses path alias: /country/[city]
  • View Mode 2: /country/[city]/bars
  • View Mode 3: /country/[city]/restaurants

I use a views block to display view modes switcher links. This view contains a contextual filter for NID. The views' block is shown correctly on the original node (/country/[city]) but not on the two additional View Mode Pages.

I found out that if I set a contextual filter for my field [city] and choose 'unfiltered value from URL' > path component '2' ('use path alias' checked) the views' block is displayed also on the View Mode Pages. Unfortunately, using this way I get a problem if the values for [city] contain two words with a space.

Is there a solution or workaround for this problem?

EDIT Additional Information:
I tried to create my 'view mode switcher' links not using views but a menu with tokens:

Link 1: [nid]
Link 2: [nid]/bars
Link 3: [nid]/restaurants

Same problem than using views. The links show up on the original page but not on the two VMP pages. Somehow, the system doesn't recognise the original [nid].

rballou’s picture

Issue summary: View changes

Can someone provide a pretty basic example of a View that would be used here? I haven't had a good opportunity to sit down and check this out in a while, but hopefully I can. Attaching a View export would be helpful for debugging.