Closed (fixed)
Project:
Views Modes
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2012 at 19:29 UTC
Updated:
5 Aug 2012 at 11:04 UTC
Hello, first of I'd like to thank you for creating the module, I've been searching some time for such functionnality compatible with D7.
Even though I had to guess how this module works, I'm pretty sure I correctly attached a mode to a page view type and then displayed the view's mode block (I can see both my available modes appear when I'm on the view's page).
It seems the links are broken though, clicking on them wouldn't change the view's display.
I've tested using
Am I doing anything wrong? Is there some crucial step I had to do?
Thank you for helping, and have a great day!
Marc-Antoine
Comments
Comment #0.0
Marc-Antoine commentedadding some
Comment #1
Marc-Antoine commentedAfter searching and testing different config, I finally found out the way to set Purl, using the 'query string' modifier type.
The module works fine, but would really need some documentation, I could write it down if you wish, I just don't know where to put it
Comment #2
allio_froggio commentedWould you mind explaining how you made the change to Purl to allow this module to work? I think I'm stuck at the same spot you were...but I don't have your aptitude to figure it out! Thanks!
Comment #3
Marc-Antoine commentedCan you tell me what you've tried so far?
What you need to do is (in order)
1. Activate the modules
2. Create a view
3. Select your view, then create 3 different display, 1 page and 2 modes (one of the mode should be identical to the page display, since it's the 'default' mode).
4. Within the Advanced settings of the mode displays, you will find a new section called 'mode settings'.
4a. Attach your modes to your page's view
4b. your mode id is a value that'll be displayed within the url, therefore use only lowercase and normal chars (e.g. 'stickers').
4c. your mode name is the one that'll be displayed in your mode changer block, this can be anything.
4d. For consistency, change the system names of your view's mode displays for their mode ID (4b), they'll be easier to identify.
5. If everything's going well, visit admin/config/search/purl.
5a. You should see 3 tabs (param, modifiers & types).
5b. Select the third tab first (types) and select the 'query string' option.
5c. Within the params tab, select the 'Query string' modifier type, and write 'mode' in the 'key' field (this is the word that'll be displayed within your url, in my case it would look like www.site.com/view?mode=stickers).
6. Now all you need to do is to add the 'Views mode links' block to your view's page (you should see links appearing on your view's page).
Comment #4
allio_froggio commentedIt worked! Thank you so much!
Of course, nothing is that easy: I set up a test view, just to see if I could get it working on something basic. When I applied it to my calendar view, it gets more complicated when preserving the filters. I'm guessing because the pagination from month to month on the calendar does not actually change the URL. When I change the URL for 12-07 to 12-09 (July to September), the switching preserves the search filters. When I just use the pagers, it does doesn't. Any ideas about that?
If not, no worries. I'm incredibly grateful that you took the time to write out the above and get me this far! Thanks again!
Comment #5
Marc-Antoine commentedInteresting implementation.
Have you tried turning off the 'Use AJAX' option? (under the advanced tab / Other section of your view's edit page)
That option brakes the views' mode & Purl implementation, since it prevents the exposed filters from changing the url.
Comment #6
Marc-Antoine commentedComment #7
allio_froggio commentedWell, that was a duh moment. I turned off Ajax and now it works like a charm!
Honestly, thank you so so so much!
Comment #8
Marc-Antoine commentedPerhaps it would be in the interest of everyone to put the procedure I wrote on #3 on the module's documentation of something?
Comment #9
allio_froggio commentedI obviously agree (see above profusion of thanks) and I'm sure that anyone else who is only a front end developer like me would benefit greatly from it!
Comment #10
batje commentedAdded a README.txt with the comment from #3.
Thanks!
Comment #10.0
batje commentedCorrecting some grammar and sentence structure stuff (sorry im not that good with english)