2 portfolios on the same page

Tanguy's picture
Tanguy
Tue, 01/16/2018 - 08:59
#1
2 portfolios on the same page

Hello,

I installed and configured 2 portfolio on the same page (one for a content type, the second for another content type) and when I click on "Load more", it displays contents of the two content types...

Tx for your help

cindy's picture
cindy
Wed, 01/17/2018 - 21:20

Hi,

Please send us your site url, admin account to check this

Congnv's picture
Congnv
Fri, 01/19/2018 - 05:56

Hi Tanguy

Please dowload md_portfolio.js file  at https://drive.google.com/file/d/1RHUf7EEZLCQZRNEJ_xKraJDfGCUfuTLs/view

then copy to folder md_portfolio/js

Tanguy's picture
Tanguy
Fri, 01/19/2018 - 05:57

Perfect !

Thanks

cindy's picture
cindy
Wed, 01/24/2018 - 21:28

Hi there, 

We are checking your issue

We will respond you as soon as we finish 

cindy's picture
cindy
Thu, 01/25/2018 - 23:07

Hi,

When you click on item of page Reportages, MD portfolio will call ajax to load node content and append to current page. They are new DOM. You need to recall lightbox to them.

Please open file md_portfolio.module and search function "md_portfolio_load_content"

Then insert the follwing code before line "print $content_view;":

if(module_exists('lightbox2')){
$script = "<script>jQuery(function($){
$(\"a[rel^='lightshow']:not(.lightbox-processed), area[rel^='lightshow']:not(.lightbox-processed)\").addClass('lightbox-processed').click(function(e) {
if (Lightbox.disableCloseClick) {
$('#lightbox').unbind('click');
$('#lightbox').click(function() { Lightbox.end('forceClose'); } );
}
Lightbox.start(this, true, false, false, false);
if (e.preventDefault) { e.preventDefault(); }
return false;
});
});</script>";
$content_view .= $script;
}

+ Save and clear cache drupal

Note: this customize code is for you only. We will not update this in later version of MD Portfolio, so you need to save it and manually update for next versions

Tanguy's picture
Tanguy
Tue, 02/13/2018 - 05:33

Hi Cindy,

another problem with integration with lightbox : when we click on a picture in the content, it opens the lightbox with the ability of using left and right arrows to navigate through all the pictures. BUT the left and right arrow are also used for navigating through the different contents at the same time !

Can you please help me?

In a private comment above, You'll find the link to see the problem

Thanks for your help

Tanguy's picture
Tanguy
Thu, 02/15/2018 - 05:40

Other thing, the lightbox for pictures is no more responsive...

Tx for your help

Tanguy's picture
Tanguy
Tue, 02/20/2018 - 02:47

Hello

Can you please confirm you receive my 3 last messages sent those last 7 days?

Thanks

Congnv's picture
Congnv
Tue, 02/20/2018 - 21:38

Hi,

We have just resumed our services after the holiday. We check and see no problem as you reported

As you can see this screenshot http://prntscr.com/ihmaiv, the left and right arrow at the top is for navigating through different contents

Then when you click on the image to show lightbox like this http://prntscr.com/ihmb59, the arrow on pictures are used for navigating through different images in a content

Tanguy's picture
Tanguy
Wed, 02/21/2018 - 03:28

Hi,

Tx for your answer.

Sorry I didn't pointed out I was talking about the KEYBOARD arrows. They trigger navigation on contents and pictures at the same time. 

Tx for your help

cindy's picture
cindy
Thu, 02/22/2018 - 03:20

Hi,

Because there are both next/prev arrows of our portfolio and lightbox at the same page, so you could not use keyboard in this case. As default, we do not support this; however, we will give you some guide:

+ When lightbox is opened, remove event keydown.cbp of porfolio :

jQuery(document).off("keydown.cbp");

+ When lightbox is closed, re-add event keydown.cbp of portfolio:

jQuery(document).on("keydown.cbp", function(a) {
if(jQuery('.cbp-popup-navigation:visible').length){
if(37 === a.keyCode){
jQuery('.cbp-popup-prev').trigger('click');
} else if(39 === a.keyCode){
jQuery('.cbp-popup-next').trigger('click');
} else if(27 === a.keyCode){
jQuery('.cbp-popup-close').trigger('click');
}
}
});

Tanguy's picture
Tanguy
Thu, 02/22/2018 - 09:31

Hi Cindy,

Tx for your answer. I'll try that.

What about the problem of unresponsive lightbox  ( Thu, 02/15/2018 - 05:40 message) ?

Tx for your help

Congnv's picture
Congnv
Thu, 03/01/2018 - 05:49

Hi Tanguy

#lightbox get default width 100% but doesn't work corectly on mobile
Copy style below to your custom css file

#lightbox{
    width: 100vw  !important;
}

Tanguy's picture
Tanguy
Mon, 03/05/2018 - 08:58

Thanks a lot, that solved the problem

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.