Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In Bootstrap Thumbnails:
Currently you can only define the number of columns for large devices. It should be possible to allow for which devices you want to add a col-**-** class. For example you may want to apply:
col-xs-12 col-sm-6 col-md-4 col-lg-3
OR
col-xs-12 col-md-3
I will follow up with a patch.
Comments
Comment #1
krystalcode CreditAttribution: krystalcode commentedAnd here is the patch.
UPDATE: How this works is that you have to define at least the number of columns for the extra small device size. If a setting is not defined for a larger size it will not produce a css class for it, which for bootstrap will mean that it will inherit the number of columns from the smaller sizes defined.
For example, setting XS to 1 column and MD to 3 columns will produce the following classes:
col-xs-12 col-md-4
which will result 1 column for XS and SM and 3 columns for MD and LG device sizes, as defined by bootstrap grid system.
Comment #2
vlooivlerke CreditAttribution: vlooivlerke commentedI get these errors when viewing a view with thumbnail bootstrap settings set to default.
This is the output:
Comment #3
tr33m4n CreditAttribution: tr33m4n commentedI also get the same errors, any updates?
Comment #4
krystalcode CreditAttribution: krystalcode commentedHey,
I had a look. Views needs a common number of columns option that will define how the HTML will be structured. regardless of the device size. This means, how many columns will be rendered per row for horizontal alignment or how many columns for vertical alignment.
I have re-rolled the patch to add an extra option for that, while keeping the other options for defining the css classes per device size. Please test and let me know.
If you are interested for a patch that outputs all columns in a single row and the number of columns shown on the screen are defined purely by the css classes options, have a look here: https://drupal.org/node/2203125
If you are interested in combining both approaches, let me know and I can roll a patch that combines both.
Comment #5
ngreenup CreditAttribution: ngreenup commentedWhat about the grid format. The patch added columns per device for thumbnails but not for grid.
Comment #6
krystalcode CreditAttribution: krystalcode commented@ngreenup you may be interested in that issue: https://drupal.org/node/2056963
Comment #7
sw3b CreditAttribution: sw3b commentedExcellent Work ! Thanks... work like a charm !
Comment #8
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedI updated the patch to do the same for the grid style plugin. I'll link from the other issue because the code in that issue is less performant/solid.
Comment #9
tr33m4n CreditAttribution: tr33m4n commentedSuperb cheers bud, will test asap
Comment #10
vlooivlerke CreditAttribution: vlooivlerke commentedPatch does not apply cleanly
views-bootstrap-thumbnail-plugin-style.tpl:15
thanks, thumbnail and carousel works well.
testing the rest
Comment #11
vlooivlerke CreditAttribution: vlooivlerke commentedSpoke too soon.
sorry, media work well! not thumbnail
I get this error
extra small screen 1
small screen 2
meduim 3
large 4
desktop 6
no matter what settings i put in it only gives me 2 thumbnails on desktop large and medium and small. Extra small works and gives me 1
Comment #12
vlooivlerke CreditAttribution: vlooivlerke commentedGrid does not work.
You only have an option to set the desktop size, no other screen sizes in between like thumbnail.
I tested all the other features this module offers and it is only thumbnail and grid that is not working, the rest works well so it could be close to put a stable bootstrap 3 out
thanks
Comment #13
tr33m4n CreditAttribution: tr33m4n commentedI've tested the patch, and apart from it not applying cleanly to the templates (fixed by comparing patch.rej) grid seems to work for me so far :) Good work
Comment #14
Christopher Riley CreditAttribution: Christopher Riley commentedI would really like to get this committed as I think it is a important bit of functionality and would like to see it be made "official".
Comment #15
Steven Jones CreditAttribution: Steven Jones commentedHere's a re-roll of #8 against the latest 7.x-3.x.
Looks like we need more reviews of the patch before we can consider it ready.
Comment #16
Christopher Riley CreditAttribution: Christopher Riley commented#15 seems to work like a champ for me thank you so much for the patch. This functionality really adds a great deal to the module.
Comment #17
that0n3guy CreditAttribution: that0n3guy commentedI can verify that this works.
This will break your existing tpl files (example: views-bootstrap-grid-plugin-style--myview-name.tpl.php).
Comment #18
rtdean93 CreditAttribution: rtdean93 commented#15 works great on the April 27 release.
Comment #19
vlooivlerke CreditAttribution: vlooivlerke commentedYes it works perfect. Thanks
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedPlase add this to official next release. Very useful!
Comment #21
bmodesign CreditAttribution: bmodesign commented#15 worked on the April 27 release as well. Thank you for the patch!
Comment #22
Steven Jones CreditAttribution: Steven Jones commentedDoes anyone who has reviewed #15 feel brave enough to change the issue status to RTBC?
Comment #23
vlooivlerke CreditAttribution: vlooivlerke commentedYes, I am brave.
Works like a charm and has moved it to production.
Have a look at my test site (this link will only live a few days)
It has a Carousel, Thumbnail, Grid, and Media views in it.
Only thing I have not tested is the export and import function of a bootastrap view.
Comment #24
friera CreditAttribution: friera commentedIt works for me, but I can't export/import the options.
How can I export this configuration to use with the features module ?
Thank you
Comment #25
Steven Jones CreditAttribution: Steven Jones commented@friera if you export the view in the normal features way, you should also be exporting the config.
Comment #26
nicholas.alipaz CreditAttribution: nicholas.alipaz commentedHere is a new version that will export properly. The issue was that the options were not defined (with defaults) in the option_definition() function.
Comment #27
nicholas.alipaz CreditAttribution: nicholas.alipaz commentedComment #28
tr33m4n CreditAttribution: tr33m4n commentedThis seems to work except when resizing the browser window to the point that it changes the amount of results per row, things get a little jumbled up, for example one row would have 3 results on it (expected) then the next would have 1 result and so on...
Anyone know why this is happening?
Cheers
Comment #29
vlooivlerke CreditAttribution: vlooivlerke commentedget the same result
try switching between horizontal and vertical alignment.
this does not fix, but is a bit better
Comment #30
vlooivlerke CreditAttribution: vlooivlerke commentedThis is how it works
it must be in dividable pairs, if that make sence
lets say large = 8
then medium must be = 4
and small = 2
OR
large = 6
medium = 3
small =1
If it is
Large = 6
medium = 4
small = 3
and small= 2
This will make the rows to display unevenly.
So this is not a bug I guess
Comment #31
tr33m4n CreditAttribution: tr33m4n commentedAh, thanks for that, will try asap
Comment #32
tr33m4n CreditAttribution: tr33m4n commentedDoes not work with large=4 medium=2 small=1 :S
Comment #33
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedPath 26 works great for me, including export of grid settings with features, thanks for your update Nicholas
Comment #34
rcodina CreditAttribution: rcodina commentedPatch on commment #26 works for me too
Comment #35
samuelsov CreditAttribution: samuelsov commentedAs described by taote in comment https://www.drupal.org/node/2056963#comment-8355529, i think we need to use clearfix instead of row if we want the grid to work with whatever number of rows depending on the screen size.
There should be only one row containing all the items and the line break will depends on where we set the clearfix.
See http://getbootstrap.com/css/#grid-responsive-resets for an example.
Another more complex example for a 3 columns, then 2 columns, then 1 column, the result should be something like :
Comment #36
vasikethere is re-roll for patch from #26 as it won't be applied because of the latest changes to repository.
probably there should be also some other changes for the template files according with the latest commits.
Si i think it "Needs work".
Comment #37
vlooivlerke CreditAttribution: vlooivlerke commentedI would like to see @samuelsov solution Comment #35 in action. Would this be the best place to get it started?
Comment #38
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedI discovered an issue with the patches; they add a 'col' class alongside the col-xx-n classes which is not supported in Bootstrap 3. This col class caused problems in some themes that I maintain. Here is a reroll of #36 without the 'col' added.
Comment #39
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedAlso removed the
Comment #40
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedfixing patch errors
Comment #41
torgosPizzaThis seems to work well for me. Thanks for working on it!
Now to figure out how to get the floats cleared correctly for different sizes...
Comment #42
sylus CreditAttribution: sylus commentedSo what is left on this issue to get this marked RTBC?
Comment #43
akalam CreditAttribution: akalam commented#20 does not appy for me. Adding a white space at the bottom works
Comment #44
akalam CreditAttribution: akalam commentedComment #45
akalam CreditAttribution: akalam commentedComment #46
bsztreha CreditAttribution: bsztreha commented#43 applied to dev, and looks work fine
but i see now more functionality as needed
I think this functionality is perfect. "Class prefix" is useless, because you can select only one screen size
Comment #47
vlooivlerke CreditAttribution: vlooivlerke commentedThis current patch is not the right direction.
It does not give you device size support for grid and thumbnail as stipulated in bootstrap. This patch does not implement clearfix.
Here is a working model. Just copy and replace to take it for a quick spin.
views-bootstrap-grid-plugin-style.tpl
Please note the clearfix in the code above. Thanks to taote
You will need to copy and replace the next 2 files, to make it work.
/templates/grid/theme.ini
and then
plugins/grid/views_bootstrap_grid_plugin_style.ini
This above code is a bit messy but works.
Now to set your grid settings to something like this.
Number of columns 6
Large devices 4
Medium devices 6
Small devices 4
Extra small devices 12
Class prefix meduim
This will give you a 3 columns grid on large
and a 2 columns grid on meduim
and 1 columns grid on extra small
Comment #48
aastrong CreditAttribution: aastrong commentedGoing to try the patch from @vlooivlerke - Hoping to get a patch RTBC.
Comment #49
aastrong CreditAttribution: aastrong commentedHavnt been able to try and create a patch yet ( been sick )
Will try to get to it this week.
Comment #50
krystalcode CreditAttribution: krystalcode as a volunteer commentedHi all,
Using multiple rows without clearfix divs (as the current patch does), single row with clearfix divs, or single row without clearfix divs, are all valid Bootstrap grid implementations and examples for all can be found in Bootstrap documentation. What we therefore need is to provide options so that the developer or site builder can choose from.
I have re-written the patch with the following major changes (horizontal alignment):
- Added a value "Single row" in the "Number of columns" option for horizontal alignment. When selected all columns will be rendered within one row.
- Added an option "Clear columns per device size", visible when "Single row" is selected. When checked clearfix divs will be added as required.
- Since with these changes the "Number of columns" option has diverged even more between horizontal/vertical alignments, I have separated them.
- The code that calculates the classes and distributes the items in rows/columns has been refactored. Functions have been separated for vertical and horizontal alignment for better readability and avoiding spaghetti code.
- Since this functionality is shared by more than one plugins (Grid and Thumbnails), some refactoring was done to avoid duplicating code in both plugins.
The defaults this patch provides are "Single row" with "Clear columns per device size" enabled. I believe this is the case that @samuelsove and @vlooivlerke discussed.
Vertical alignment has not changed, apart from providing a default of 4 columns.
Calculation of the clearfix divs in this patch happens as follows. Say we have 7 results, with 1 column for xs, 2 columns for sm, 3 columns for md, and 4 columns for lg device sizes. The result will be:
Please review & test and let me know if everything works!
Comment #51
andjsmit CreditAttribution: andjsmit commented#50 is working for me. Provides a much needed feature. Hope to see it committed soon.
Comment #52
Christopher Riley CreditAttribution: Christopher Riley commentedPatch worked for me on a fresh copy of dev although I did have to go back and resave a couple of views. I say please lets get this committed.
Comment #53
maxplus CreditAttribution: maxplus commentedWow,
very nice feature, #50 works great for me on the current dev-version
Thanks!
Comment #54
bsztreha CreditAttribution: bsztreha commentedI tried, but i found one bug on lg view mode. I've attached the explination
Settings for LG is 6 grid
Comment #55
maxplus CreditAttribution: maxplus commentedCorrect, I have the same issue with lg mode, I did not see it in the first place...
=> my grid is set to 3 columns in lg mode (so col-lg-4)
Comment #56
krystalcode CreditAttribution: krystalcode as a volunteer commentedThanks for spotting this, here is the patch including a quick fix. Let me know if that works.
Comment #57
bsztreha CreditAttribution: bsztreha commented#56 Looks good! Thanks for quick reply.
Comment #58
maxplus CreditAttribution: maxplus commentedHi,
thanks for the quick fix!
My settings are as follows:
- Number of columns per views row: Single row (+clear columns per device size checked)
- Number of columns for extra small devices : 2
- Number of columns for small devices: 3
- Number of columns for medium devices: 3
- Number of columns for large devices: 3
Maybe interesting for others, you need to keep the setting "Number of columns per views row" to "Single row"
=> if I change this to some other setting, I get empty spots in my grid
Comment #59
gge CreditAttribution: gge commentedHello,
Can somebody please provide a patch that can be applied against the latest dev version?
Thank you
Comment #60
krystalcode CreditAttribution: krystalcode as a volunteer commentedPatch 56 was created against the latest dev version, did you have any specific issue with it?
Comment #61
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedside-note: I used this module and issue as a reference in an article about paid modules in Drupal:
http://www.sooperthemes.com/drupal-blog/whats-your-opinion-premium-drupa...
.. because there is a paid module in codecanyon that has the functionality we want here nicely worked out: http://codecanyon.net/item/bootstrap-grid-drupal-7-views-grid/6732197 . Video demo: https://www.youtube.com/watch?v=jWfYKdCEpOc
Comment #62
gge CreditAttribution: gge commented@krystalcode
I just downloaded 7.x-3.1+24-dev and patch #56 can be applied only to
plugins/grid/views_bootstrap_grid_plugin_style.inc
All files bellow can't be patched:
All I get from Netbeans is a window saying "The patch cannot be applied in the selected context"...
Thanks
Comment #63
krystalcode CreditAttribution: krystalcode as a volunteer commentedHi @gge,
I've tested the patch again and it applies cleanly on the latest dev version. There might be something that you're doing wrong on the way you're applying the patch? Have a look at this https://www.drupal.org/node/1139226#comment-6681748.
Comment #64
rcodina CreditAttribution: rcodina commented@gge I also cleanly applied patch on #56 into 7.x-3.1+24-dev version of module (I use a terminal under mac os).
The patch seems to work fine so far.
Comment #65
gge CreditAttribution: gge commentedHi,
Using the terminal I was finally able to apply the patch. Don't know why I couldn't do it using Netbeans... Now I have to test it.
Thank you,
Comment #66
bsztreha CreditAttribution: bsztreha commented@krystalcode
I've realized, that the views export (and features export) doesn't place 'clear_columns' like this:
But if i have changed the form element from checkbox to select, and set options: '#options' => array(0 => t('No'), 1 => t('Yes')), then it looks good
Has anybody this problem?
Comment #67
nicholas.alipaz CreditAttribution: nicholas.alipaz commented@bsztreha https://www.drupal.org/node/2203111#comment-8864903 has the answer. No default was set for clear_column. Changing to needs work so that gets fixed.
Comment #68
sylus CreditAttribution: sylus commentedLooking at the patch it appears the defaults were specified? @nicholas.alipaz can you confirm this?
Comment #69
aveach.bfr CreditAttribution: aveach.bfr commentedI've been able to apply the patch in 56 to the dev release. It works, but I'm seeing this error:
Notice: Undefined index: columns_horizontal in _views_bootstrap_preprocess_views_style_plugin_prepare_grid_horizontal() (line 125 of /var/www/public/sites/all/modules/views_bootstrap/views_bootstrap.module).
Is there an existing note about this I'm missing?
Comment #70
adam-delaney CreditAttribution: adam-delaney commented@bsztreha I can confirm this issue with features. The work around is to open the view and re-save the setting. I get the following errors if this workaround has not been performed.
Comment #71
Christopher Riley CreditAttribution: Christopher Riley commentedI would really like to see this patch get officially applied I am getting tired of patching lol.
Comment #72
taatg37 CreditAttribution: taatg37 as a volunteer commented#56 has worked for me against the 7.x-3.x-dev released on 2015-Sep-30. It provides the possibilities to specify columns against 4 different device widths.
Comment #73
torgosPizzaThe patch in #56 works for me, and works exactly as expected. Please consider committing it to 7.x-3.x!
Comment #74
krystalcode CreditAttribution: krystalcode as a volunteer commentedI've also tested it again against the latest dev version, applies cleanly and works as expected.
- Problem reported on #69 and #70 happens when the patch is applied and there are existing views that use Grid or Thumbnail. Since the options have changed, there are warnings about options or variables not found. Re-saving the view fixes the problem. Maybe this should be mentioned in the release notes.
- Situation reported on #66 happens because views does not export an option if it has the default value because it is unnecessary. It is not a problem and everything should work just fine. I did make a small change in this patch (#74) so that the clear_columns option is defined as a boolean in order to follow the same definition that checkbox options provided by the views module have.
- I've applied the same sensible defaults to Grid and Thumbnails, not sure why they were different.
After these, I don't think there is anything holding us from adding this patch to the next release ...
Comment #75
torgosPizzaThanks for the updated patch! Setting to Needs Review, so others can give it a test drive.
Comment #76
dillix CreditAttribution: dillix commented#74 works great!
Comment #77
waverate CreditAttribution: waverate commented#74 works great.
Thank you.
Comment #78
HallSL CreditAttribution: HallSL commentedI just applied the patch in #74. It seemed to apply cleanly, but when I added it to my site... I got these errors:
Notice: Undefined index: columns in template_preprocess_views_bootstrap_grid_plugin_style() (line 11 of /home/historik/public_html/sites/all/modules/views_bootstrap/templates/grid/theme.inc).
Warning: Division by zero in _views_bootstrap_split_rows() (line 30 of /home/historik/public_html/sites/all/modules/views_bootstrap/views_bootstrap.module).
Warning: Division by zero in _views_bootstrap_split_rows() (line 31 of /home/historik/public_html/sites/all/modules/views_bootstrap/views_bootstrap.module).
Warning: Division by zero in template_preprocess_views_bootstrap_grid_plugin_style() (line 15 of /home/historik/public_html/sites/all/modules/views_bootstrap/templates/grid/theme.inc).
Notice: Undefined index: class_prefix in template_preprocess_views_bootstrap_grid_plugin_style() (line 16 of /home/historik/public_html/sites/all/modules/views_bootstrap/templates/grid/theme.inc).
Where did I go wrong?
Thanks!
Comment #79
waverate CreditAttribution: waverate commented@HallSL
From #74:
Comment #80
HallSL CreditAttribution: HallSL commented@waverate
The errors in #69 and #70 don't seem to be the same errors, different undefined indices, different files and/or different lines. Also the earlier errors don't mention division by zero.
And I did see those comments and deleted the only view I had and recreated it... no joy. Any other ideas?
Thanks,
Hall
Comment #81
krystalcode CreditAttribution: krystalcode as a volunteer commented@HallSL
I assume you applied the path against the latest dev version?
Comment #82
HallSL CreditAttribution: HallSL commentedYes, I am/was using the latest version of Views Bootstrap. Indeed, when in views, I saw the desired options to set the number of columns per view port size. Seemed good, but the errors persisted and wouldn't let the view save.
Comment #83
krystalcode CreditAttribution: krystalcode as a volunteer commentedI'm not sure what you mean "wouldn't let the view save". You should be able to save the view anyway, these errors may happen during rendering.
Comment #84
HallSL CreditAttribution: HallSL commentedMy bad. The view does save. The errors happen when I try to view the result.
Comment #85
Alexandre360 CreditAttribution: Alexandre360 commentedTested the lastest 7.x-3.x dev version and I don't understand the new configuration.
Before, we had the possibility to define the number of columns you want for all the 4 media queries.
Now you can just specify it for one
So how to do somethink like this :
- 4 columns on big screen
- 3 columns on medium screen
- 2 columns on small screen
- 1 column on extra small screen
Before it was possible and It seems it's not now :/ did I miss something ?
Comment #86
krystalcode CreditAttribution: krystalcode as a volunteer commentedHi @Alexandre360,
I'm not sure if I understand the issue you're encountering, attached is a screenshot of what you should be seeing in the Bootstrap Group or Bootstrap Thumbnails settings. You certainly can define col-* class per screen.
Comment #87
logsd CreditAttribution: logsd commentedHi krystalcode,
I have the same behavior described by Alexandre360 in #85 with latest 7.x-3.x dev version, not the one shown in your "snapshot12.png" above.
In short, the latest 7.x-3.x dev version allows to define the "Number of columns" and to choice only one "Class prefix" (xs, sm, md, lg).
Comment #88
adam-delaney CreditAttribution: adam-delaney commentedI have tested patch #74 and seeing the new configuration values in views, however if I attempt to package the view in features and deploy the new feature, I must manually save the view for it to work properly. If you are packaging configuration and deploying it using features this becomes a big issue. I feel like this patch still needs work. Here are the errors when deploying new configuration settings without manually saving the view.
Notice: Undefined index: alignment in _views_bootstrap_preproces_views_style_plugin_prepare_grid() (line 108 of [path_to_module]->views_bootstrap.module).
Notice: Undefined variable: clearfix in include() (line 35 of [path_to_template]->views_bootstrap/templates/grid/views-bootstrap-grid-plugin-style.tpl.php).
Warning: Invalid argument supplied for foreach() in include() (line 35 of [path_to_template]->views_bootstrap/templates/grid/views-bootstrap-grid-plugin-style.tpl.php).
Comment #89
adam-delaney CreditAttribution: adam-delaney commented@logsd and @Alexandre360 , are you applying the patch to the dev version? You must apply the patch to the latest dev in order to see the changes.
Comment #90
adam-delaney CreditAttribution: adam-delaney commentedWhat I'm noticing when features configuration for the view gets exported, there are 2 missing style_options:
I see the options being set in the database in the views_display table -> display options serialized array, however when features exports these options they are missing for the view. I'm not quite sure how ctools exports this configuration so any help would be appreciated.
After further testing, I see that if the configuration for alignment is set to 'vertical', the style_option is exported properly for both alignment and clear_columns.
Thanks.
Comment #91
adam-delaney CreditAttribution: adam-delaney commentedDigging a little deeper I started looking into views export_options() code. I'm using views-7.x-3.11.
[path_to_views_module]/includes/base.inc on line 247
The
if ($value !== $default)
is not allowing the values for alignment and clear_columns to be exported, oddly enough they get exported for the other values. I see that the other values are all integers, where these values are string and boolean respectively. I wonder if this is part of the issue.It may be possibly to define an export value for strings and booleans that are in a default state, but we'll have to do some digging.
I'm wondering if this is related to the issue Allow Views export of all style settings (https://www.drupal.org/node/1513198) is having. It doesn't look like they have not solved the issue, but I wanted to document what they have tried.
Comment #92
adam-delaney CreditAttribution: adam-delaney commentedBreakthrough on getting the features export to work. I was traveling down the wrong path and assuming the option_definition() was not properly defined for exporting the view. The issues lies within getting these style options in the template_preprocess functions. Instead of getting the options from $var['view']->style_options (which appears to be the options that get exported) we should be getting these options from the style plugin array like this $vars['view']->style_plugin->options.
I have attached a patch that has all the code from patch #74 thanks to @krystalcode and also have included the update to the preprocess functions in views_bootstrap.module.
Comment #93
tobiasaldgard CreditAttribution: tobiasaldgard as a volunteer commented#92 fixed the things I needed. No bugs as far as I can see.
Thanks @adam-delaney
Comment #94
dillix CreditAttribution: dillix commented#92 Works good!
Comment #95
sylus CreditAttribution: sylus commentedAny chance for an official release with this bundled in anytime soon? :)
Comment #96
aastrong CreditAttribution: aastrong commented#92 is working great for me,
Any chance of this getting pulled into the latest 7.x-3.1 ?
Cheers !
Comment #97
Tyera CreditAttribution: Tyera commentedI'm having trouble getting patch #92 applied successfully to my module.
Would anyone be able to share the files for their working version?
Comment #98
adam-delaney CreditAttribution: adam-delaney commented@Tyera, are you applying the patch against the latest dev?
Comment #99
Tyera CreditAttribution: Tyera commentedYes, I downloaded a fresh version of 7.x-3.x-dev.
Comment #100
sylus CreditAttribution: sylus commentedThe patch does work so there is something wrong with your process.
Comment #101
sylus CreditAttribution: sylus commentedSo what are the odds of getting this issue in or at least looked at by the maintainer? Before leverage this patch want to make sure for the most part it is stable and it will likely be merged.
Comment #102
Tyera CreditAttribution: Tyera commentedThank you, yes, I understand that. It would still be really helpful to get a copy of a working version, and help me I am identify where my process is going wrong.
Comment #103
Mile23+1 on this.
7.x-3.x-dev currently allows you to set the 'default' breakpoint for the thumbnail view format. So it's a little better in dev, allowing you to change the breakpoint where it collapses from the column setting to full-width. I don't see this in 7.x-3.1. I hope we can get a release for this either way...
The patch in #92 does apply against dev, which is good and proper. :-)
Needs placeholders instead of concatenated strings. https://www.drupal.org/node/322774
Also, missing the closing paren from '(see related'.
Comment #104
zenimagine CreditAttribution: zenimagine commentedhello thank you for your work. The patch works with grids.
With mignatures it does not work, I have a blank page.
Could you put an archive with files and patch applied?
thank you
Comment #105
sylus CreditAttribution: sylus commentedAttahing patch based on latest feedback fixing the placeholders issue.
Comment #106
joelstein CreditAttribution: joelstein commentedI'm so glad to discover this patch! It's just what this module needs to make the grid format truly flexible. Thanks to everyone who worked on it.
I tested the grid functionality and it seems to work as advertised. The clearfix support is perfect.
Is there no way to add a custom class per column? I can see that very helpful for styling, for example, to add vertical spacing between the columns as the grid breaks down per breakpoint.
Also, not a huge deal, but in the HTML there's a space before the column classes:
Comment #107
joelstein CreditAttribution: joelstein commentedHere's a patch which does the following things:
_views_bootstrap_preproces_views_style_plugin_prepare_grid
.Comment #108
yaach CreditAttribution: yaach commentedI have tried all the patches on this issue, none of them work form me. Latest dev and try to use Bootstrap Grid. The containers only get the following classes: col col-lg.
I spent lot of time trying to get this to work but nothing! Anybody?
Comment #109
aastrong CreditAttribution: aastrong commented@yalegria - have you re-saved your view after applying the patch ? As you will have to change the settings to get the different classes for each breakpoint.
I have tried the most recent patch and it has worked for me,
Comment #110
yaach CreditAttribution: yaach commented@aastrong - this is my procedure in applying the patch(es):
1. drush en views_download --select
2. Select [1] for the dev option
3. Select (y) to overwrite the current module
4. Download patch under modules/views_bootstrap
5. Apply patch: patch -p1 < patch-file
6. Clear cache
7. Resave my view.
No luck whatsoever.
Comment #111
aastrong CreditAttribution: aastrong commented@yalegria
Hey there, i just re-did the exact same procedure and it worked fine for me.
for #7 - can you click on settings, and tell me what you see ?
Do you see a number of different options instead of the options before the patch ?
Maybe try clicking settings, change the settings, than save.
Thanks and let me know.
Comment #112
yaach CreditAttribution: yaach commented@aastrong
Settings:
Grouping: none
Alignment: Horizontal
Number of columns per views row: Single Row
Clear columns per device size: checked
Number of columns for extra small devices: 1
Number of columns for small devices: 2
Number of columns for medium devices: 3
Number of columns for large devices: 4
I did try to change the settings, even to Bootstrap Thumbnails where YES it works, but when I use the Bootstrap Grid the classes are not introduced on the DOM. and yes I need to use Bootstrap Grid. Really dont know what is wrong with my setup. thanks for your help.
Comment #113
aastrong CreditAttribution: aastrong commentedsounds like you either have a caching issue when looking at your page - or maybe you have the wrong view on your page
Anyways, hope you figure it out - the patch is certainly working if you are seeing the settings change.
Cheers.
Comment #114
pinueve CreditAttribution: pinueve commentedPatch #107 works perfect, this is what I did, I zip downloaded 7.3 DEV version, unzip file, dowloaded #107 patch, place it in same dir of views-bootstrap module, open git bash in module dir, apply patch (git apply -v views_bootstrap-columns-per-device-2203111-107.patch), remove from server old module, upload new module (dev version with patch already applyied), clear caches, open your view, apply your custom settings (bootstrap-grid view), save changes, enjoy.
Comment #115
djake CreditAttribution: djake commentedPatch in #107 worked perfectly on dev.
Comment #116
kslagboom CreditAttribution: kslagboom commentedPatch #107 worked for me.
Installed DEV version, Applied patch. Looks good.
Comment #117
zdean CreditAttribution: zdean commentedtried to patch #107 on the dev using Terminal but got this error:
UPDATE: used "patch -p1" and seems to have worked.
Comment #118
rcodina CreditAttribution: rcodina commentedPatch #107 worked for me too! Please commit soon!
Comment #119
KarinGconfirming that patch 2203111-07 applies cleanly to 7.x-3.x-dev (and works great):
karins-macbook-pro:views_bootstrap sysadmin$ cat 2203111-107.patch |patch -p1
patching file plugins/grid/views_bootstrap_grid_plugin_style.inc
patching file plugins/thumbnail/views_bootstrap_thumbnail_plugin_style.inc
patching file templates/grid/theme.inc
patching file templates/grid/views-bootstrap-grid-plugin-style.tpl.php
patching file templates/thumbnail/theme.inc
patching file templates/thumbnail/views-bootstrap-thumbnail-plugin-style.tpl.php
patching file views_bootstrap.module
drush cc all
edit view ->et voilà!
Comment #120
tantadruj CreditAttribution: tantadruj commentedHaving some issues with applying the patch, using latest module version. Bellow link is an image of the problem.
http://i.imgur.com/NX5BTBr.png
What am i doing wrong?
Comment #121
ikeigenwijs CreditAttribution: ikeigenwijs commentedpatch applied cleanly.
Comment #122
stevieb CreditAttribution: stevieb commentedPatch in #107 works
Comment #123
dadderley CreditAttribution: dadderley as a volunteer commentedthanks zdean
Had the same issue in Terminal when running the patch
This worked for the patch in 107:
patch -p1 < views_bootstrap-columns-per-device-2203111-107.patch
Comment #124
dadderley CreditAttribution: dadderley as a volunteer commentedThe enhanced functionality is really nice.
thanks zdean
Had the same issue in Terminal when running the patch
This worked for the patch in 107:
patch -p1 < views_bootstrap-columns-per-device-2203111-107.patch
Comment #125
ikeigenwijs CreditAttribution: ikeigenwijs commentedupdated credits before commiting
Comment #127
ikeigenwijs CreditAttribution: ikeigenwijs commentedComment #128
adam-delaney CreditAttribution: adam-delaney commentedI have written an update hook that attempts to maintain backwards compatibility for grids before granular breakpoint control was committed. See: https://www.drupal.org/node/2807415#comment-11769694
Comment #129
jweirather CreditAttribution: jweirather commentedJust updating for any newcomers, the patch is committed to the dev version and appears to be working great.
Thanks to everybody who worked this out, provides great flexibility.
See also previous comment (128) about an update hook for backwards compatibility if you already have views built on this format.