Hello All,

I'm a bit confused by views setup within this module. I see a few different types of views...full gallery, page view, block, etc.

I'm simply trying to setup my "view all galleries" page and I'm unable to the "page" view. I was assuming the "page" view which has a path set to "galleries" would display the galleries I've created. But it doesn't it just returns at Page not found error.

Yet, when I go to the /node page, I see my galleries. If I load the block into one of my regions I see one of my galleries. So, my question is two-fold:

1. What are the individual views for, within the views gallery..."full gallery", "page", "gallery image", block", etc.

2 And I can obviously modify the block view to create an all galleries view, but what would be the most efficient way within the current setup out of the box to load an "all galleries view."

Thank you, please let me know if you need any further info.

Bryan

CommentFileSizeAuthor
#7 views_gallery-list_albums.patch2.11 KBk4ml

Comments

NeoID’s picture

I'm stuck on the same question

kasha_x’s picture

I have the same problem. I tried making a page loading the teasers of each gallery but the picture that comes up starts the slideshow and doesn't link to the gallery. Could someone help us out please? Other than this issue, this is a great module and I'm happy everything else works perfectly :-)

karens’s picture

The 'page' view is the gallery node, because the view is embedded in the node. You do not need to set up a 'page' view and it won't work right if you do. You see the gallery by navigating to the gallery node.

I know this is different than setting up an ordinary view so I'm not sure how to make it more clear how this works.

NeoID’s picture

Here's the view I use to list albums, hope it helps :)

$view = new view;
$view->name = 'galleries_listing';
$view->description = 'A page view displaying teasers of all existing galleries.';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Gallery page (list of galleries)', 'default');
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'gallery' => 'gallery',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'Photo Galleries');
$handler->override_option('row_plugin', 'node');
$handler->override_option('row_options', array(
  'relationship' => 'none',
  'build_mode' => 'teaser',
  'links' => 1,
  'comments' => 0,
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'galleries');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Galleries',
  'description' => 'Photo Galleries',
  'weight' => '0',
  'name' => 'primary-links',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
k4ml’s picture

StatusFileSize
new2.11 KB

Can we have #6 as default views also ? Attached patch that add this to views_gallery.views_default.inc.

hornetnz’s picture

If you apply that patch, how do you get it to make the new view? Disable and reenable the module?

k4ml’s picture

You just need to refresh the Views list page (admin/build/views/list) to get the new Views. Make sure to clear the cache first (admin/build/views/tools).

hornetnz’s picture

Thanks for that k4.

Another related question...
I'm thinking of using taxonomy for the gallery content type so I can separate event galleries from personal galleries. Is taxonomy the right way to do that? And once that's done, how can I make a view for each type and yet still have them on the same node/page? I'm thinking it would have to be done with 2 views (or view page displays?) and a panel to combine them, but I'm sure there are other ways.

i.e.:

Event Galleries
-------------------
x y z

Personal Galleries
-------------------
a b c

weaponx’s picture

Very interesting view. A few questions i hope someone has the knowledge to answer:
Is it possible to change it from node view to field view?
If yes then can it show thumbs linked to node instead of lightbox the front image for the album?
Is it possible to remove the created by/date?
Is it possible to style the title different than regular titles? (i want smaller text and wordwrap)

I advance thank you

grimer’s picture

Hi,

I'm quite new to Drupal and I was having a few problems getting a 'gallery of galleries' to work with this module.

I'd just like to thank NeoID for taking the time to post that code. I've now got things working (until I read your post, I wasted 6 hours messing around!)

I just have a question regarding the style of the 'gallery of galleries'. How can you change the way the page is displayed - e.g. so that it matches the style in this video:

http://www.lullabot.com/articles/photo-galleries-views-attach

This is how things currently look:

http://i5.photobucket.com/albums/y179/grimerking/galleryofgalleries.jpg

I'd like things to look more like this - i.e. 1) 'title' of gallery, 2) teaser image below the title, 3) description of gallery to the right of the teaser image :

http://i5.photobucket.com/albums/y179/grimerking/galleryofgalleries-want...

Any help, much appreciated.

** Edit **

Also, as Weaponx asks above, is there a way to disable Lightbox in this view, so that clicking on the teaser/thumbnail links to the gallery below and doesn't open up Lightbox?

kakajoe’s picture

me neither...but somehow..i can not fix it... :( everyone just said play the CSS ...

greenchuck’s picture

I achieved the "lullabot galleries" look by going into the gallery content type>Manage Fields, then moving the "Attached view: gallery - node_content_2" to be under the Title, and before the body.

This arranges the image that it pulls from the photo node to display before the body, and then it should wrap the text in the body right up beside the image. If for some reason it doesn't THEN you may need to play with CSS.

But the primary issue I had was that the gallery content type was displaying the body before the photo, so it was alot easier to just flip those, if that makes sense.

kakajoe’s picture

thanks man !! ur my hero..it works !!

kakajoe’s picture

thanks man !! ur my hero..it works !!

pkcho’s picture

Sorry for the dumb question, I'm trying to import the view from post #6?

When I attempt to import it from the Views admin page clicking on the "import" tab and pasting in the code, I receive the message:

"Unable to interpret view code."

Can someone help me with what I'm doing wrong?

Thank you very much.

greenchuck’s picture

1. Make sure you copied the entire code, I left out the last line and got the same thing.
2. If you're putting something in the View Title, leave it blank.
3. If you already have a view named galleries_listing, rename it.

pkcho’s picture

I had to turn off the rich text editor, that worked for me. Thanks for your help.

TmaX-2’s picture

Referring to #6 code by NeoID i had managed to create a new gallery page with views with a Menu by creating view
with
row style : node
filter node type:gallery

My question and my quest for the past week is how can i now create Gallery page with only the title and teaser thumbnail(latest image from views gallery already working) and not the teaser text describing the gallery

How do i get rid of the teaser text from my gallery page?
I tried changing my row style to field in my new view for gallery page but i could only manage getting title linked to the sub gallery. When i do select teaser the teaser text again comes out with the thumbnail.

How do u get rid of the teaser text describing the gallery. Please help anyone
thank you

asb’s picture

@weaponx (#11):

Is it possible to change it from node view to field view?

Of course it can be changed to field view; you'll get all fields of the gallery. The problem is, that most of us want to have at least one static picture from the gallery, and the images are not stored inside the gallery node.

The interesting question is: How do we get the referenced image nodes into a gallery view?

The usual way would be to build a relation to the referenced content type, but that alone doesn't expose the imagefield values to the view. Also adding a required argument doesn't suffice since then I'm getting either no results (when filtering for content type "gallery") or a listing of image nodes (when not filtering to any content type). So somehow the view seems to need ro replicate the functionality from "Attached view: gallery - node_content_1" and/oder "Attached view: gallery - node_content_2", but that logic I did never fully understand.

So the question remains: How do we build a tabular or other field-based listing of galleries which includes at least one image from the image gallery? Has anyone digged into this?

Thanks & greetings, -asb

danny englander’s picture

#6 worked great for me but I am also concerned with #11 as I start to get into theming this thing as I usually use "Row style: fields" to leverage views theming and CSS goodness. Time will tell.

Poieo’s picture

Reverse Node Reference works really well if you want to use fields rather than nodes. However, you must have MySQL 5.1 or higher running on your server for it to work.

asb’s picture

Yes, and that's why this module didn't make it into CCK. For example, Debian GNU/Linux "Lenny" (stable) comes with MySQL 5.0.51a, so this module is useless for users of Debian stable.

Greetings, -asb

Hunkah’s picture

Hello everyone,

Thank-you all for helping me get all this sorted out. I have spent 3 days trying to make this all work! UGH!

I have only one issue left, for some reason my "galleries" aren't linking to their respective gallery pages. What am I doing wrong this time? :)

Thanks for your help.

-Hunkah

karens’s picture

Status: Active » Closed (duplicate)

This is basically a duplication of the discussion in #530760: Add view of all Galleries....

mmachina’s picture

is it possible to use solution #6... but also use fields instead of node? i would prefer to use fields to have better control over how the teaser elements will look. if i use node, then only way is to use contemplate... but it seems it would be much easier to just use views and css... any suggestions?

calebm12’s picture

Thank you for #14. Worked perfectly.

johnhanley’s picture

Even though this issue is closed, here's one additional note regarding NeoID's gallery list Views export in comment #6.

If you're like me, you instinctively want to click on the gallery image instead of the title to access a particular gallery.

To link the gallery node image as a link (in addition to the gallery node title) simply:

1) add a relationship using the gallery node reference.
2) add an EXCLUDED node nid field BEFORE the image field using the gallery relationship
3) edit the image field and use the "Output this field as a link" and define the link path as "node/[nid]"

No fuss, no bother, no messing with Views templates.

Hen-joy!

John

mwbyrd’s picture

Green Chuck,

Thanks so much. That solved my problem after spending all morning trying to figure this out. I was on the right track and thought about changing the order in the actual View. That didn't work...

I never thought that a new field (attached view) was added to a content type when using Views Attachments. Just another thing in my arsenal if I can ever get my head wrapped around attachments!

Thanks again.

Mike

mwbyrd’s picture

Don't know if you ever figured this out, but try this:

1. Enter ther Gallery View
2. Click on the Gallery Image display
3. Click on Content: Image in the Fields Setting
4. Check the 'Output this field as a Link" button
5. Enter the link path and use node/[nid]
6. Change the Format Image to 'Short"
7. Add Node: NID to the Fields Setting (make sure it's listed first in the Fields Setting)
8. Click on Node: NID
9. Set Relationship to Gallery
10. Check "Exclude from Display"

That should work.

dan_metille’s picture

#23
Hi, Can you please explain me how to use Reverse Node Reference?

Thanks for help.