the module is way cool, only thing missing [for me] is a way to limit it's functionality to certain pages [via context or any other way]

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RobLoach’s picture

Would be a great idea... Context support would be nice. Was also thinking having a image field formatter for Vegas so that you could create a View of select image fields and than display those in a block on the page, and have contextual backgrounds appear.

otorrents’s picture

I would find very practical to be able to select what themes or pages this module apply.

Patrick Nelson’s picture

I agree, being able to choose by page, or context would be excellent. It is possible to "override" using CSS but the backgrounds are still loading behind the page so it's not ideal.

deixadilson’s picture

I think it is a mandatory feature for this module. And maybe you could specify the classes or ids of the wrappers for the plugin to be loaded into.

Vacilando’s picture

Title: specify pages to use/exclude vegas from » Specify pages to use/exclude vegas from

Much needed functionality indeed. For the beginning it could be as simple as a textarea where we could type paths to be included or excluded (like what the core Block module has).

zmove’s picture

+1 for this, this woule be really useful.

admdh’s picture

i found i way how not use it on front page.
So in modules folder the is vegas.js
i have added "not-front" class to body on 13th line
so code looks now like this

Drupal.behaviors.vegas = {
attach: function (context, settings) {
$('body.not-front').once('vegas', function() {

and background does not appears on front page now..

Anonymous’s picture

This seems like a show stopper for me. I only want vegas on the landing page, not every page on the site.

Anonymous’s picture

Just an FYI, if some simply is not an option, rules integration is probably preferable over context.

Anonymous’s picture

Looks like the Supersized module offers this functionality with context integration.

Anonymous’s picture

I found that supersized had its own issues. I could not get the context option to work for that module. I am using the backstretch module for now but I would prefer Vegas if there was just some way to limit the pages on which it appears.

Neil McKay’s picture

Issue summary: View changes

Regarding #7 above, I found that I was able to get the slideshow to show ONLY on the front page by changing line 13 to
$('body.front').once('vegas', function() {

That makes me very happy.

Anonymous’s picture

Thanks for sharing Neil McKay!

Neil McKay’s picture

I realized that I can create a content type specifically to contain the slideshow
and then modify line 13 of the vegas.js (see #7 & 12 above) to say
$('body.node-type-my_content_type').once('vegas', function() {
(where my_content_type is the machine name of the content type I created)

That way I can have the slideshow display on only one interior page if I want. The content type could be a clone of my regular content type if I wanted, with the only exception being the name and machine_name. putting that machine name in line 13 will make ONLY a page in that content type display the slideshow.

Now my question is, would it be bad form to clone the Vegas module under a different name so as to have different slideshows show on different content types? Or is there a more elegant way to do that?

Deciphered’s picture

Status: Active » Needs review
FileSize
5.16 KB

Added a basic page control system based directly off the Block module page control system.

I also added a new hook, hook_vegas_enable(), which any module can implement to return TRUE or FALSE, however if any module returns TRUE then the Vegas module will be active. A simple Context plugin could be created, but I don't currently have that need as what I've implemented suits my personal needs, and can be used in Context via the Contextual Variables module (https://drupal.org/project/context_variable).

Vacilando’s picture

Tested and using in production; works excellent!

jrochate’s picture

I'm also using in production.

Thanks.

Deciphered’s picture

(If you've reviewed and tested the patch, please consider marking it as RTBC (Reviewed and Tested By the Community / Ready To Be Committed) to increase the chance of this being committed.

Manuel P.V.’s picture

#18 How is marked as RTBC?

Deciphered’s picture

@Manuel

When commenting on this issue, there's the 'Issue metadata' section above the Comment section, simply adjust the 'Status' from 'Needs review' to 'Reviewed & Tested by the community'.

demonrage’s picture

Status: Needs review » Reviewed & tested by the community

works like a charm, really cool.

robriley78’s picture

Patch worked great for me. Thanks.

kingfisher64’s picture

Yep works lovely.

@RobLoach would you please be so kind as to commit this as it's a big usability improvement :)

Thanks

pringlz’s picture

Patch works great! Maybe somebody add features to alpha?

dqd’s picture

Assigned: Unassigned » dqd

Holy cow! ... this is an old one. Especially because of the fact that this is a main reason to favour a module over a theme implementation, as I have stated already on another spot. Thanks to all the reports and thanks to @Deciphered for the patch. Since I am a new co-maintainer of this project I will commit this patch to dev immediately.

dqd’s picture

Checking patch vegas.admin.inc...
Checking patch vegas.module...
error: while searching for:

  return $libraries;
}

error: patch failed: vegas.module:136
error: vegas.module: patch does not apply

Let me reroll this against latest dev ...

dqd’s picture

Title: Specify pages to use/exclude vegas from » View on pages context support
/sites/all/modules/vegas (7.x-1.x *=) $ patch -p1 < page_control-1929888-15.patch 
patching file vegas.admin.inc
patching file vegas.module
Hunk #3 succeeded at 155 with fuzz 1 (offset -1 lines).
dqd’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
5.7 KB

rerolled patch via patch -p1 ...
... please review

jbitdrop’s picture

patch applies cleanly on latest 7.x-dev - functionality is visible and works without flaws here. tested by setting visible on <front> only.

dqd’s picture

Status: Needs review » Reviewed & tested by the community

wow that was fast! :) ... thanks for report, @jbitdrop - same here. And since it has been tested before already and only needed another reroll against latest dev,we maybe should commit it to make the community happy. ;)

  • diqidoq committed 01a7484 on 7.x-1.x authored by Deciphered
    Issue #1929888 by diqidoq, Deciphered: View on pages context support
    
dqd’s picture

Status: Reviewed & tested by the community » Fixed
dqd’s picture

Assigned: dqd » Unassigned
dqd’s picture

New 7.x beta release published. Feature added.

dqd’s picture

Status: Fixed » Closed (fixed)
jbitdrop’s picture

Wow! Thanks @diqidoq! You were really fighting the issue queue last night.

diqidoq++

dqd’s picture

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

And the feature is already ported to Drupal 8 (I think it was coming in by the github code of @medienverbinder which I used as basis for the 8.x dev branch init, kudos!) So let's set it to 8.x to have it on radar for the D8 port beta blocker list and if any new flaws are chiming in.