You might want to include the view to show all galleries as posted at http://www.lullabot.com/articles/photo-galleries-views-attach#comment-6159

Eric

Comments

Oleksa-1’s picture

i support this feature request, too. Because anyway , who will use this module will have to create menu item (using views) for galleries page.

asb’s picture

subscribing

Anonymous’s picture

Just what I was looking for.

balaftuna’s picture

is there a temporary way of having a view of all the galleries?

axel pressbutton’s picture

Subscribing :)

A very nice gallery setup, thanks!

karens’s picture

Status: Active » Fixed

This is a simple fix. We use an argument on the block to tell which gallery to pull the pictures from and I changed the default to show all galleries. This does seem like a better default. You can still edit the view to give the argument a default value if you want to see only pictures from a specific gallery.

karens’s picture

I don't understand #1. The gallery view is the gallery node you created. You can give it a menu or not, just as with any other node.

Status: Fixed » Closed (fixed)

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

Vasu’s picture

How to create a list or gallery of all gallery nodes?

Vasu’s picture

Status: Closed (fixed) » Active

Is there anyway to show a list of all galleries in a page/node with a teaser view on the frontpage?

grimer’s picture

Hi Vasu,

Not sure if you're trying to create a 'gallery of galleries', but NeoID was kind enough to post the code for a 'view' that can be imported.

http://drupal.org/node/640220

I navigated the 'Views' page and clicked on the 'Import' tab. I then just pasted in NeoID's code and saved. This automatically created a new view and a 'Galleries' menu link at the top of the page. This is a 'gallery of galleries'. You might need to adjust the settings to get it how you want it - e.g. galleries ordered by descending post date, etc.

I hope that helps.

Rob

Vasu’s picture

Thanks rob, it works well. Now I have a page with a list of galleries and a menu item.
Is there anyway by which just 2 or 3 recently added galleries alone can be displayed on the front page (that is what i mentioned wrongly as 'teaser view on the front page')

Vasu’s picture

Oh yeah, 'views attach' module rescued me.
I created a new content type 'gallery list' and created a 'gallery list' content (node).
Now I created two 'node content' views - Both attached to Node type- gallery list.
--The first node content view (named Full node content) is attached to full node (of the content type 'gallery list' )
--The second node content view (named teaser node content) is attached to the teaser of the node.
Now i published the 'gallery list' to front page. The front page shows 3 recent galleries (sorted descending) while the full node shows a list of all galleries.

grimer’s picture

Hi Vasu,

I'm not entirely sure how to follow your instructions. Could you please export the code for this view and post it here?

What are the exact names that I need to give the new content types - i.e. human readable and machine readable?

Thanks,

Rob

Vasu’s picture

Hi rob,
The name of the new 'content type' can be anything you want.It is just used to tag(attach) the gallery view. Anyway i am putting the code here.

$view = new view; $view->name = 'photo_galleries'; $view->description = 'List of 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', 'Defaults', 'default'); $handler->override_option('fields', array( 'field_gallery_image_fid' => array( 'label' => 'Image', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_node' => 1, 'label_type' => 'widget', 'format' => 'short_linked', 'multiple' => array( 'group' => TRUE, 'multiple_number' => '', 'multiple_from' => '', 'multiple_reversed' => FALSE, ), 'exclude' => 0, 'id' => 'field_gallery_image_fid', 'table' => 'node_data_field_gallery_image', 'field' => 'field_gallery_image_fid', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'changed' => array( 'order' => 'DESC', 'granularity' => 'second', 'id' => 'changed', 'table' => 'node', 'field' => 'changed', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'status' => array( 'operator' => '=', 'value' => '1', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'status', 'table' => 'node', 'field' => 'status', 'relationship' => 'none', ), 'type' => array( 'operator' => 'in', 'value' => array( 'gallery' => 'gallery', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', '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('items_per_page', 12); $handler->override_option('style_plugin', 'grid'); $handler->override_option('style_options', array( 'columns' => '3', 'alignment' => 'horizontal', )); $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('node_content', 'Full Node content', 'node_content_1'); $handler->override_option('types', array( 'gallery_list' => 'gallery_list', 'page' => 'page', )); $handler->override_option('modes', array( '0' => 'full', '1' => 'edit', )); $handler->override_option('argument_mode', 'nid'); $handler->override_option('default_argument', ''); $handler->override_option('show_title', 0); $handler = $view->new_display('node_content', 'Teaser Node content', 'node_content_2'); $handler->override_option('items_per_page', 3); $handler->override_option('types', array( 'gallery_list' => 'gallery_list', )); $handler->override_option('modes', array( '0' => 'teaser', )); $handler->override_option('argument_mode', 'nid'); $handler->override_option('default_argument', '');

asb’s picture

The code you posted can't be imported into 'views'. Error message:

Unable to interpret view code.

Greetings, -asb

okday’s picture

subscribing

Vasu’s picture

Sorry about it; CKeditor had spoilt it. Here is the working code. Before importing this code make sure two or more photo galleries are created using views gallery module. Create a new content type 'gallery_list' and create a node of this type (just give any title to it and leave the body field empty;publish it to front page).
Install views attach module and then import this code.

$view = new view;
$view->name = 'galley_list_view';
$view->description = '';
$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', 'Defaults', 'default');
$handler->override_option('sorts', array(
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
  'changed' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'gallery' => 'gallery',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 0);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'grid');
$handler->override_option('style_options', array(
  'columns' => '3',
  'alignment' => 'horizontal',
));
$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('node_content', 'Full Node content', 'node_content_1');
$handler->override_option('types', array(
  'gallery_list' => 'gallery_list',
));
$handler->override_option('modes', array(
  '0' => 'full',
));
$handler->override_option('argument_mode', 'nid');
$handler->override_option('default_argument', '');
$handler = $view->new_display('node_content', 'Teaser Node content', 'node_content_2');
$handler->override_option('items_per_page', 3);
$handler->override_option('use_pager', '0');
$handler->override_option('types', array(
  'gallery_list' => 'gallery_list',
));
$handler->override_option('modes', array(
  '0' => 'teaser',
));
$handler->override_option('argument_mode', 'nid');
$handler->override_option('default_argument', '');

If you want each gallery thumbnail to run as a slide show you can edit the 'gallery' view 'gallery image' display type style to 'slideshow' and 'items to display' to any number more than 1 (views slideshow module is needed).

mlieshout’s picture

How can I translate the menu-item of the 'view of all the galleries' into another language? I've searched the forum but can't find the solution.

Best regards,

Maarten

mlieshout’s picture

I think I've found a way to translate the menu-entries:

http://dev.mariusilie.net/content/how-to-drupal-6-multilingual-views-and...

asb’s picture

As with #640220: Views Gallery: Page View Question this view requires 'row options = node' and soes not expose fields to the view. It has exactly the same limitations like NeoIDs approach.

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 solved this issue already?

Greetings, -asb

globalplayer’s picture

I'm waiting for this as well...

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.

karens’s picture

Status: Active » Fixed

There is a simpler way to do this, it can be a regular page view listing all the galleries. There is no need to create a custom content type and a single node to hold the results, this makes more sense as a regular view.

I'm adding a view to list all galleries.

asb’s picture

Version: 6.x-1.0 » 6.x-1.3

> I'm adding a view to list all galleries.

Thank you! Since there is no 6.x-1.x-dev this will get into 6.x-1.4, I assume?

-asb

aitala’s picture

It is in the 6.x-1.3 release put out today.

Just check the Views page.

Eric

Status: Fixed » Closed (fixed)

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