I read the docs, enabled Tracker in Views, and added named custom template in sites theme directory but still the pager does not show up. I guess I need a little bit of hand holding here. I am using Drupal 6.12 and custom_pagers-6.x-1.10-beta1.

Comments

asb’s picture

Similar issue here: Custom pager does not show up reliably - on some nodes it's there, on others it doesn't shop up.

I'm open to suggestions ;)

Greetings, -asb

plebe’s picture

Same issue. Tried adding/removing arguments in Custom_Pager module and view, paging in view off/on, AJAX in view off/on,

Here's the weird thing. paging for that node (in this case, images) works fine in Views preview, and if I click on any link FROM THAT PREVIEW. But not when entering through Galleries on front end.

This was a D5.x to D6.13 update, and un-installed/re-installed custom_pager module.
Running:
Custom Pagers 6.x-1.10-beta1
Views 6.x-2.6
Image 6.x-1.0-alpha5 (Image Galleries turned on)

ubersoft’s picture

Turn off the caching feature for custom pagers. I had the same problem until I turned that off and now it shows up when it's supposed to.

asb’s picture

Hi ubersoft,

do you mean the checkbox "Cache the list of nodes" at ./admin/build/custom_pagers/edit/1? I've never hat checked that one...

Greetings, -asb

ubersoft’s picture

Ah. that is what I meant. If it was never checked, then... I dunno. Sorry...

dailypress’s picture

I am having the same issue. Anyone?

I would like to use this only for Blog posts! and not images. Nothing works...

I tried setting the block view and ALL my blog posts show in the block.

I followed the Basic Settings Instructions

dailypress’s picture

I did notice that the instructions for basic settings says:
"
If you are using Drupal 6, you must currently install the 6.x-1.x-dev version of Custom Pagers, as there is a serious bug in 6.x-1.10-beta1 (when used with Views, it only shows up to 10 items, no matter what). "

although I think my issue is something else cause nothing shows up.

dailypress’s picture

i think my issue is almost fixed.
I just deleted the cookies and refreshed the page and it showed up.

now I need to configure it properly including fixing the theme.

dailypress’s picture

actually now im totally confused. it shows up on some pages and sometimes it doesnt. I changed it to Block and I see a whole list, no Next or Prev links.

then when I set it above and below post it showed up for a second then when I clicked on another page it dissapeared.
Does this have anything to do with Cache?

SteveK’s picture

same deal here. No custom pager showing up. trying to debug the code.

mcsolas’s picture

Just found some info that may help.
http://www.robhamm.com/tutorials-and-essays/website-building-and-adminis...

On that page, he indicates that custom pagers only show if your view row style is fields ( as opposed to node ). He explains his workaround in the post.. setting it first to fields, then to node.. afterwards they display.

Should this issue be a bug report?

asb’s picture

alberto2000’s picture

updating to the dev snapshot did solve the problem for me!
pager shows up right now.

shivnibble’s picture

Same here - 'reverted' (read updated) to dev, and it's working fine.

biped’s picture

Version: 6.x-1.10-beta1 » 6.x-1.x-dev
Issue tags: +custom pager, +Views Gallery

I'm using the custom pager with the views gallery module. Ultimately, from a gallery page (with all of the associated images appearing as icons) I would like to click on an image icon to display the image node with the comment form below and the custom pager above. Unfortunately, the pager doesn't show up.

Here is what I am doing:

I created a default view, say image_pager_view, with the following settings:
- Relationships: Gallery Node Reference, clicked 'required'
- Arguments: Gallery Node Reference, with 'Gallery' and 'Node' as the validator, using Node ID as arg type
- Filters: Node Type: Image, and Published: True
- Fields: Node ID (just as a placeholder)

Then I created a custom pager, called Image Pager, with the following settings:
-Pager Visibility, by Image node type
-Setting the view: image_pager_view
-View Arguments: [field_gallery-nid]

I'm assuming the way this works is: when it gets ready to display an image node, the custom pager then calls the image_pager_view by passing the [field_gallery-nid], which is the gallery the image belongs to. The view then filters out the published image nodes, then uses the argument to filter those which have the same 'field_gallery' node ID. I presume I could have even used the gallery view (as created by the views gallery module) as it would have filtered the same set of nodes, right?

So, this doesn't work and the custom pager never appears, what am I doing wrong?

Also, I've done a test where I set up the image_pager_view with no Arguments or Relationships, just filtering all nodes of type Image. This actually works with a custom pager appearing with ALL of the image nodes.

I'm also using the dev version of Custom Pager as the beta version seems to have a bug.

Any help in this matter would be greatly appreciated. Thanks.

asb’s picture

@biped:

have you followed the instructions to set up a Custom Pager according to the documentation?

To get a custom pager on Views-based Gallery pages working, I had to add a few lines to my themes template.php (examples, and to add a custom-pager.tpl.php template to my theme.

If you have those ingredients and it's still not working, maybe you can post some code here.

Greetings, -asb

Cray Flatline’s picture

I have same problem. I have front page created with Panels. I have placed views block on the panel and created custom pager for this view. But custom pager doesn't shown there even though I see it in the view preview. Seems it looks like problem of #2
plebe, but with dev version and clearing cache (and cookies) doesn't help.

I'm using version 6.x-1.x-dev and latest versions of panels and views.

Does anybody know any solution?

jimmb’s picture

Hi asb, I'm having the same issue as biped.

I have installed Views Gallery, along with the 6.x-1.x-dev version of Custom Pagers, and followed the instructions here and here. But it's not working...

I then tried adding some custom code as described here and here. But that made no difference either.

My pager is set up as follows:

  • Pager position: below the node's body
  • By node type: Image
  • Use a view: Gallery

The view I assume is correct with the basic install of Views Gallery, though I did try one adjustment:

In the "Gallery Image" view display, I changed "Items to display" from "1" to "0" (I thought maybe the pager wasn't working as there was only 1 item). But this made no difference.

So if this all sounds correct, then I'd be curious how you got it to work. You mentioned adding code (which I tried), but it would be helpful to know exactly what you did.

Thanks,

Jim

asb’s picture

@jimmb:

The instructions I followed are linked in #16. Please post the code snippets you're using (e.g. template.php and custom-pager.tpl.php from the theme you are using).

Greetings, -asb

jimmb’s picture

Hi asb, thanks for the response! Here's what I have currently, based on this ...

In the theme's template.php file, after the existing code, I added:

function phptemplate_preprocess_custom_pager(&$vars) {
  // if we're at the end, the nav_array item for this (eg first) is NULL;
  // no need to compare it to current index.
  $vars['first'] = empty($vars['nav_array']['first']) ? '' : l('first', 'node/' . $vars['nav_array']['first']);
  $vars['last'] = empty($vars['nav_array']['last']) ? '' : l('last', 'node/' . $vars['nav_array']['last']);
}

Then, I copied the "custom-pager.tpl.php" file from the Custom Pagers directory to my theme's folder, and replaced the code at the bottom with:

<ul class="custom-pager custom-pager-<?php print $position; ?>">
  <li class="first"><?php print $first; ?></li>
  <li class="previous"><?php print $previous; ?></li>
  <li class="key"><?php print $key; ?></li>
  <li class="next"><?php print $next; ?></li>
  <li class="last"><?php print $last; ?></li>
</ul>

However, as you can see from http://cjmm.sundaysenergy.org/node/26, it isn't working (if you click one of the pictures on that page, the resulting image should have a pager).

In general, I don't see how the above code would help because it appears to refine a pager setup that is already working. But I'm open to any suggestions at this point...

Jim

asb’s picture

@jimmb (#18): Let's check the basics first.

  • Running 6.x-1.x-dev is important, the "stable" release doesn't work;
  • if you added or modified a template in your theme, make sure you clear the theme registry and other caches, including views cache;
  • set "Pager position" to "Both above and below" (first we want to see if it is working at all);
  • create a different (simpler) view (Items to display = unlimited; Row style: Fields), like so:
$view = new view;
$view->name = 'custom_pager_images';
$view->description = '';
$view->tag = 'gallery';
$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(
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'title' => array(
    'order' => 'ASC',
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'tid' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'add_table' => 0,
    'require_value' => 0,
    'reduce_duplicates' => 0,
    'set_breadcrumb' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '3' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'banner' => 0,
      'gallery' => 0,
      'image' => 0,
      'page' => 0,
      'photoset' => 0,
      'story' => 0,
      'video' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '4' => 0,
      '3' => 0,
      '2' => 0,
      '5' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_node_flag_name' => '*relationship*',
    'validate_argument_node_flag_test' => 'flaggable',
    'validate_argument_node_flag_id_type' => 'id',
    'validate_argument_user_flag_name' => '*relationship*',
    'validate_argument_user_flag_test' => 'flaggable',
    'validate_argument_user_flag_id_type' => 'id',
    'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'image' => 'image',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('empty', 'No photos have been added to this gallery.');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 0);
$handler->override_option('use_pager', '0');
$handler->override_option('style_options', NULL);
$handler->override_option('row_options', array(
  'inline' => array(),
  'separator' => '',
  'hide_empty' => 0,
));

(#20) template.php and custom-pager.tpl.php are looking fine.

Good luck, -asb

scooper’s picture

Just sharing that I had no problem at all using the pager with Image Gallery. I did need to use the 6.x-1.x-dev version to get past the problem of only the first 10 images having the pager display.

1. I used these instructions: http://drupal.org/node/709462 with one small change:
For the pager "View Arguments" I changed the instructions from
term
[term-id]
to
[term]
[term-id]
2. I did not modify the gallery view
3. I did not modify or add any php anywhere

jimmb’s picture

Hi asb,

Thanks for the reply and apologies for my delay in response!

I just added added a new view ("test_view"), which I imported using the code you provided. I then adjusted it to be filtered for "Image", and added a page view with "1" image to be shown at a time. I also gave it a url: http://www.claytonjacksonmcghie.org/test-view

Then I went back into Custom Pagers and added a new pager. I selected "Both above and below..." for pager position, set the node type to "Image", and selected "test_view" for the view to use. After saving, I'm still not seeing the custom pagers.

I then tried adding:
[term]
[term-id]

and just:
[term-id]

for "View arguments" (under Pager node list). But none of those changes produced a pager either. This is definitely strange; any other advice is much appreciated....

Jim

larryc11’s picture

Jim,

Something I just tried and worked for me. When I added [term-id] like you did, I made sure that the "View arguments:" text box was in "Source" mode (I had installed the FCKeditor module which converts plain text automatically into XHTML). Otherwise, "[term-id]" will be submitted to the Custom Pager as < p >[term-id]< /p>.

Let me know if this works.

Larry

BeaPower’s picture

anyway to show this without code? Im at lost when it comes to that.

j-ford’s picture

Hi, I was wondering if someone could help. I have followed the instructions above again and again. Even created new content types and views just to match the stuff above. I cannot get Custom Pagers to work.

If I print the $node variable on my page it doesn't seem to give me any Custom Pager information other than:

    [custom_pagers] =&gt; Array
        (
            [1] =&gt; stdClass Object
                (
                    [pid] =&gt; 1
                    [title] =&gt; Simply Offices Views Custom Pager
                    [list_php] =&gt; 
                    [view] =&gt; centre_display_individual
                    [args] =&gt; 
                    [position] =&gt; both
                    [visibility_php] =&gt; 
                    [node_type] =&gt; centre
                    [reverse_list] =&gt; 0
                )

        )

As you can see there is no value tag being created for me to display. Is this right? I am completely at a loss on what to do to get this to work.

Any help would be greatly appreciated.

Cheers,

Jason

enrix’s picture

Priority: Normal » Major

I'm using Drupal 6 with custom_pagers 6.x-1.0-beta2 and my View's name is Album:
Fields:Content:Photo
Row style:fields
Filters:Node:published yes
Node:type= Photo
Arguments:Taxonomy:Term ID
I configured my Custom Pager like this:
Title:Other photos in [term]
Pager position: below the node's body
By node type: Photo
Use View.Album
View arguments: [term-id]
When I added [term-id] my "View arguments:" text box was in "Source" mode (I had installed the FCKeditor module which converts plain text automatically into XHTML).
The point is that my custom view shows all my image nodes in Album but the custom_pager doesn't show up on those nodes.
Any suggestions?
Thanks!

jasonhoward7’s picture

j-ford --
did you ever get an answer to this? I'm getting the same $node variable results.
thx
-another jason

nato71’s picture

When you modify the pager, the PHP filters are deleted.

I added the following to both filters and resolved the issue:

return TRUE;
ropic’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

using a view with relationships not shows pager