Arguments...I need help

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

Thanks Khalid for the talk about Views, etc the other night. I know I've been needing to learn more about Views (specifically arguments) and this talk got me fired up to get some experience with it. I've been battling with arguments since Friday trying to get it working on some sites of mine...to no avail tho.

Are there any training resources that anyone knows of (screencasts) to help with this? I know it 'should' be simple and I am sure it is when you know what you are doing (like Views is in general) but I can't grasp it. I'd be happy to post what I am trying to do/achieve with a site of mine if people here are willing to help and learn about it as well...I'm just not sure this is the proper venue to do that sort of posting.

Comments

Links

kbahey's picture

I assume that you have read the documentation on arguments here http://drupal.org/node/54455. More specifically, some use cases here http://drupal.org/node/206845

This article delves a bit deeper http://www.translationdesigns.com/en/unraveling-logic-views-argument-han... and makes the conclusion : "Once you understand that Views is expecting an array and that the argument handling code is just a place for altering that array" then you can wrap your head around it.

Another example: http://www.starbowconsulting.com/blog/tao/power-views-argument-handling-...

You may want to experiment with this module too http://drupal.org/project/views_argument_api

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Some progress!!

mdowsett's picture

Thanks Khalid - I did find the first two links you mentioned but since the examples weren't the fields I was using to do the arguments, it didn't help enough...I did find a screencast on blip.tv yesterday that helped me get started but I am kicking myself that I didn't bookmark it so I could share it.

I was able to get some taxonomy arguments working (very cool!) and the problem I was struggling with for so long is that I was using the "Taxonomy Field: xx" argument and I couldn't get it to work. When I switched the argument to "Taxonomy: Term Name", I got it to work as planned.

So my next step was to get my head around the Menus section of Views...which I managed to thanks your your tip that a separate view had to be created for each tabbed menu you wanted (I had always thought for some reason it was related to Arguments). The only issue I am having with that now is that the tabs in my views are only viewable by the admin user (UID=1) only. Anon users can't see them nor can auth users....and I don't see any access privileges related to the Views menus...any ideas there?

I think I'm off to the races after this. Thanks again for the session.

Menu permissions

kbahey's picture

What are the URLs like? (ad_gallery/list, ad_gallery/by_vote, ad_gallery/by_something_else)

Do you have one view (and only one!) that is designated as default menu tab?

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Bingo!

mdowsett's picture

Bingo!

I set a Default one now and it works.

I knew it was something 'simple' (if you know what you are looking for).

Except now I have duplicates

mdowsett's picture

Except now I have duplicates of every tab...
http://www.goflyxc.com/events/past/all

...what would cause that?

So I have one main view (/all) that has the default tab menu set and then I have 4 more separate views for the separate years (each with the menu & tab options checked...but of course no default menu settings). Is that proper?

Waterloo Region Drupal Users Group

Group organizers

Group notifications

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