Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wrapping Views around your fingers 1. 2 Dennis Solis Solis Media Group Solis Media Group Over 20 years of application software development. Over 20 years.

Similar presentations


Presentation on theme: "Wrapping Views around your fingers 1. 2 Dennis Solis Solis Media Group Solis Media Group Over 20 years of application software development. Over 20 years."— Presentation transcript:

1 Wrapping Views around your fingers 1

2 2 Dennis Solis Solis Media Group Solis Media Group Over 20 years of application software development. Over 20 years of application software development. 2 years of Drupal development 2 years of Drupal development Assisting with D8 Migration in core Assisting with D8 Migration in core d.o. : densolis d.o. : densolis irc: #drupal-florida & # drupal-migrate: densolis irc: #drupal-florida & # drupal-migrate: densolis skype: densolis.aol.com skype: densolis.aol.com

3 Dennis Solis Born and raised in SF 3 Live in Cocoa, Florida

4 Views Aggregation Topics TopicsModules Ask for filterviews Aggregationviews views aggregator plus 4

5 Views If Time Topics TopicsModules Views conditionalviews_conditional Downloadviews_data_export 5

6 Ask for filter before view runs 6 Change from Basic to Input required. (Example 1)

7 Ask for filter before view runs 7

8 You are all experts in Aggregation 8

9 What is aggregation? Groups “things” in a useful way. Aggregation means to collect, combine, and / or summarize data in some useful form. In the context of views tables, aggregation is: The process of grouping and compressing row Based on the values of one or more columns While applied summary (aggregation) functions on other columns. Count, sum, minimum, maximum, etc. 9

10 How could you possible be a AGGREGATION expert? 10

11 Why? Organize your content in a meaningful way. Calculate summary totals 11

12 Aggregation 12 (Example 2)

13 Other Aggregation Examples Google analytics Nielsen TV ratings Gallup poll / surveys Summary reports totals Newspaper – News, Sports, Business 13

14 Two types of Aggregation Native aggregation from within Views Native aggregation from within Views Additional module: Views Aggregation Plus (views_aggregator) Additional module: Views Aggregation Plus (views_aggregator) 14

15 Native Views Aggregation Aggregation is the process of grouping and compressing result rows based on the values of ONE OR MORE columns. Does NOT generate grand totals 15

16 Native Views Aggregation Done from within the views module Done from within the views module Enable this by changing “Use aggregation: Yes” Enable this by changing “Use aggregation: Yes” Aggregate parameters assigned to each field Aggregate parameters assigned to each field Examples Restaurant menu Restaurant menu Sons of American Veterans Sons of American Veterans 16 (Example 3)

17 Native Views Aggregation Native aggregation from within Views Native aggregation from within Views 17

18 Native Views Aggregation Restaurant survey Example (4) Restaurant survey Example (4) 18 CT – Menu Item CT – Wait staff CT – Customer Order CT – Customer Survey CT - Menu section

19 Views Aggregation Plus Views Aggregation Plus Aggregation is the process of grouping and compressing result rows based on the values of only ONE columns, while applied summary (aggregation) functions on other columns. Does generate a grand total. 19

20 Views Aggregation Plus Views Aggregation Plus Download & enable the views_aggregator module (aka Views Aggregation Plus) This add a new “format” in views Table with aggregation options Use table with aggregation Settings Disables / over rides native Views aggregation Examples Examples Restaurant menu Example (6) Restaurant menu Example (6) Sons of American Veterans Sons of American Veterans 20

21 Views Aggregation Plus Views Aggregation Plus 21 (Example 5)

22 Views conditionals module: views_conditional module: views_conditional You want to check some condition before you decided to the field should be displayed.. In my case, I check a person’s role before decide if they have the permissions to see a specific field. Example Example 22

23 Download a table into a CSV file modules:views_data_export modules:views_data_export The module view data export will allow you to download your table view into a comma separated value (CSV) file. 23

24 Download a table into a CSV file modules: views_data_export The module view data export will allow you to download your table view into a comma separated value (CSV) file. 24

25 Download a table into a CSV file Data export is exposed on your view 25 (Example 6)

26 Download a table into a CSV file Choose “Data Export” from the +Add in views Notice your Format is CSV File 26 (Example 10)

27 Download a table into a CSV file Setting The text “by deselection this, the xml file…” is a bit misleading. Need to check “Provide as file” if you want a download file! 27 You can put replacement patterns in the file name

28 Download a table into a CSV file Make sure you specify: A path I used _dnld Attach to – The view to attach the download. Batch export – Yes if big download Pager = Display all items 28

29 Views conditionals module: views_conditional module: views_conditional You want to check some condition before you decided to the field should be displayed.. In my case, I check a person’s role before decide if they have the permissions to see a specific field. Example Example 29

30 Make a table view “responsive” module: table trash module: table trash While we cannot make a table view truly responsive, this does the next best thing. When the table view is displayed on a tablet or a phone, table trash hides the required number of columns so that the report will fit on the device. To expand the report the user can then click on the plus next to the line in which they are interested. 30

31 UHK Suggestions for Views Name content types in singular Name content types in singular Names views in plural Names views in plural Include node type in field name Example (1) Include node type in field name Example (1) Easily find field in views list of fields. Easily find field in views list of fields. If using multiple views: If using multiple views: “All displays” vs “this page” “All displays” vs “this page” Structure -> Views -> Settings Structure -> Views -> Settings Show the SQL query Show the SQL query Make input required BEFORE views runs. Make input required BEFORE views runs. 31

32 UHK Suggestions for Views Page views with same path. Page views with same path. Bad – only one view will appear in the menu Bad – only one view will appear in the menu Good – if the different views have different role permission, you can have multiple views under one menu item – and role appropriate view will appear. Good – if the different views have different role permission, you can have multiple views under one menu item – and role appropriate view will appear. With views aggregation – do not sort the data. Let the aggregation do it. With views aggregation – do not sort the data. Let the aggregation do it. Don’t forget to put in No Results message in your view. Don’t forget to put in No Results message in your view. 32

33 Congratulation! You are now an Advance Views builder! 33


Download ppt "Wrapping Views around your fingers 1. 2 Dennis Solis Solis Media Group Solis Media Group Over 20 years of application software development. Over 20 years."

Similar presentations


Ads by Google