Hey there,
first off - amazing work, in my years of Drupal experience, this kind of module (stitching multimedia, views and some other UX all together) almost never works out of the box. However this + colorbox module were literally seamless plug n'play, so thanks for that :)

I was curious whether its expected that the slideshow feature of Colorbox is expected to work in the Colorbox Node.
My use-case: a View of misc (basic) content types, formatted as fields, one field is node title, with colorbox node option enabled.

If its not an expected feature, any chance of getting pointed in the right direction, or perhaps some insight into a possible solution plan?

thanks again!

Comments

iLLin’s picture

I haven't actually looked in to that. I'm sure there is a way but the way I had to use colorbox to load the content, into the box easily for the user, I used the built in AJAX framework. It doesn't fully integrate with colorbox per say as I load the content into a hidden container on the page and then push it to the colorbox window. Not sure if the "grouping" would work with out some custom code help.

inders’s picture

cool...
+1 maxxer
Would be nice to see more integration with views and pagers.. One click ... Trigger Infinite/circular slideshow.. :-)

http://drupal.org/project/custom_pagers
http://drupal.org/project/flippy

rajmataj’s picture

Seems like this guy got a gallery of multiple fields to show in a colobox modal window:

http://www.cmsquickstart.com/blog/tutorial-how-build-lightbox-portfolio-...

inders’s picture

@rajmataj, in this example he is displaying multiple image fields in colorbox .. this is feature is already there and we can trigger colorbox slideshow for image fields, so in this case one image will be visible and others would be triggered using colorbox.

But I was thinking little different here ,.. it will be just like using view with ajax pager in colorbox.. but colorbox will indicate the pagers.. total number of items etc etc..would like to give it a try ;)

Salif’s picture

Hi,
I used colorbox with colorbox-node to display content in a modal box with success.
I'd love to use colorbox with freepager or flippy or custom-pager to make a slideshow of content. I tried for five days without success. Is there someone who has done this? Any ideas?

iLLin’s picture

You can try to use views, but you would need to do some custom coding to get "the spot" of the content within the ordering. Let me explain.

Say you have a content type called photo.
You create a view of these photos with an AJAX pager and output of 1 per page.
Then you have it sorted by upload date.
This will work fine as long as the user opens the FIRST photo, then the pager will go in order to the next and so on.
The pager is AJAX so it will stay in the open colorbox window.

The problem is if a user opens a photo in the middle of the pager. You would need to "find" what page this photo would be on. When a user clicks the photo, you need to default the page number of the view so it displays correctly. Then the user can step backward or forward within the colorbox modal as if its a gallery.

Hopefully that makes sense and there would be some custom coding involved to find the page the photo belongs to so you can setup your view defaults.

Salif’s picture

StatusFileSize
new36.96 KB

Thanks to you illin for quick reply

I use Commerce kickstart for my website and I modified the collection view of rendered node in order to show the full-content in a colorbox modal window. Everything works fine except the service-links that do not appear...
As I want a pager inside the modal window, I added a field of commerce product image via the relationship

  • I set the image with the colorbox formatter with an image per page gallery,
  • I set unordered display 1 value(s) for multiple field settings. This gives me a nice slideshow with an image of each node.
  • I tried to rewrite the content: rendered node adding on the image field above
  • and then place a url rewritten as < a class="colorbox-node" href="[url]?width=600&height=600"> Quick View < / a >
  • If I understand correctly, it is not recommended to use ajax since it is the view of main content.
    My idea was that the slide (pagers) appears inside the modal window. But without success.

    The following image represents what I want to do

    iLLin’s picture

    The pager needs to be AJAX for it to stay in the modal box.

    IdanC’s picture

    I'm in a pickle...

    Colorbox-node was a life saver for me, allowing me to create complex popups combining images with content.

    But, the project i'm working on demands the gallery feature. did anyone had any luck with coding this solution?

    iLLin’s picture

    StatusFileSize
    new3.96 KB

    I have started some work on this but its really rough and needs some testing. You need to add a rel="" attribute to the links you want to group and it will only group what is on the page. It won't group links that are on different pages when using a pager.

    Anyway this is against 3.x-dev.

    iLLin’s picture

    Version: 7.x-2.3 » 7.x-3.x-dev
    Component: Miscellaneous » Code
    Status: Active » Needs work
    iLLin’s picture

    StatusFileSize
    new7.93 KB

    Cleaned up the code and made it more reusable. New patch attached.

    iLLin’s picture

    iLLin’s picture

    Status: Needs work » Needs review
    IdanC’s picture

    wow! you're too good to be true!

    i'll test it during the weekend and report.

    thanks allot!

    Sarenc’s picture

    Great work!

    It would be nice to get a rel in the views output but I'm not sure how to do it.

    This didn't work :)

    /**
       * Apply our colorbox-node class and add our widths and heights
       * to the query params.
       */
      function render_link($node, $values) {
        if (node_access('view', $node)) {
            if (!empty($this->options['node_in_colorbox'])) {
              $this->options['alter']['link_class'] = 'colorbox-node';
              $this->options['alter']['rel'] = 'test';
              $this->options['alter']['query'] = array('width' => $this->options['node_in_colorbox_width'], 'height' => $this->options['node_in_colorbox_height']);
            }
        }
        return parent::render_link($node, $values);
      }
    
    iLLin’s picture

    I think I added this to DEV, let me verify.

    iLLin’s picture

    Just committed to DEV the rel attribute for views.
    http://drupalcode.org/project/colorbox_node.git/commit/406165f

    This should of been its own issue btw :)

    Sarenc’s picture

    Thank you sir!

    iaminawe’s picture

    Using the latest dev I cannot seem to get this to work correctly yet. I see that the rel attribute is being set across the linked titles of my view but I am not seeing any pager arrows when I open the node in colorbox.

    I should also mention I am using display suite if that makes any difference.

    Getting this right would be an awesome feature - look forward to testing it more - nice work

    iLLin’s picture

    Try doing it without display suite first.

    iLLin’s picture

    Status: Needs review » Fixed

    Fixing this as the rel attribute for grouping content on a single page is in DEV. Please open a different issue if you were wanting something else.

    aalireza’s picture

    how i can use for slide to next/prev content ?

    i have views show content and open in colorbox, how i can add next and prev links ?

    iLLin’s picture

    It's added via the "rel" attribute.

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

    Anonymous’s picture

    Issue summary: View changes

    grammar

    eigentor’s picture

    Version: 7.x-3.x-dev » 7.x-3.3
    Category: Feature request » Support request
    Issue summary: View changes
    Status: Closed (fixed) » Active

    I have set the "colorbox-node-gallery" class on the link and as well a rel attribute, which shows up in my rendered view, but no gallery function.
    I tried an empty rel attribute, I tried entering something else, but no luck.
    The latest stable version appears to contain this function, I've compared it with dev.
    In your initial commit, there appeared to be an extra settings form inside views for the rel attribute, which has gone now.

    Maybe writing something into the README would help.

    kopeboy’s picture

    Title: Slideshow feature? » Gallery feature?
    Priority: Normal » Major

    iLLin please can you provide more info, this is not clear.

    How should we setup the View for this to work?

    I tried this (not working):

    A view page with a list of images, which are a field rewritten to link to node/[nid]
    The field has "Link image to": Nothing, Rewrite results: Output this field as a link
    Link path: node/[nid]?width=600px&height=95%
    Link class: colorbox-node-gallery colorbox-node
    Rel Text: gallery

    The link opens a colorbox with the full node correctly, but no gallery is present (of course I would like the gallery to go through the listed nodes in the view page).

    (I set this to major because its about something written on the module page..)

    Ayran’s picture

    I have the same problem with Views and manual link with "colorbox-node colorbox-node-gallery" - the link opens the colorbox with the node correctly, but no gallery is present. This appears when using 7.x-3.3 and 7.x-3.x-dev. When going back to colorbox_node-7.x-3.1 the issue is fixed and gallery support is back.

    kopeboy’s picture

    Wow, thanks. Do you know what do I loose if going back to 3.1 version from 3.3?

    iLLin’s picture

    See if the latest DEV fixes this issue. http://drupalcode.org/project/colorbox_node.git/commit/de138d6 If it does not please provide more info with your setup. Also, try a base theme such as garland or bartik to make sure your theme isn't messing with it.

    Ayran’s picture

    Hi, with the latest dev for me there is gallery support. Thanks.

    Ayran’s picture

    Is the functionality to group links that are on different pages when using a pager implemented in colorbox node gallery? Otherwise I have to load a gazillion images on the same page which is a performance issue...

    iLLin’s picture

    Status: Active » Closed (fixed)

    @Ayran please see https://www.drupal.org/node/2478689#comment-9870331 for possible solutions. Closing this down as gallery support currently exists.