Top Banner
1
18

Drupal meetup presentation flag, flag weights and draggable views

Dec 14, 2014

Download

Technology

A quick overview on how to use Flag, Flag Weights and DraggableViews
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Drupal meetup presentation   flag, flag weights and draggable views

1

Page 2: Drupal meetup presentation   flag, flag weights and draggable views

Flaghttp://drupal.org/project/flag

Flag Weightshttp://drupal.org/project/flag_weights

DraggableViewshttp://drupal.org/project/draggableviews

2

Introduction to...

Page 3: Drupal meetup presentation   flag, flag weights and draggable views

So what are they?

Flag: Provides the ability to “mark” a node or user in a list

Flag Weights: Extends Flag to allow marked items to be ordered

DraggableViews: Provides an extension to Views for administering ordered lists

3

Page 4: Drupal meetup presentation   flag, flag weights and draggable views

FlagsFlag is a flexible system for flagging nodes, comments and users

Flags can be “global” or per-user

Integrates with Views, Token, Rules, Features, Services and Activity

Has an API for extending functionality even further

4

Page 5: Drupal meetup presentation   flag, flag weights and draggable views

Flag Weights

Flag Weights is a simple extension to the Flags module

It alters each flagged item to have a weight

This allows you to create arbitrary ordered lists of nodes, users and comments

5

Page 6: Drupal meetup presentation   flag, flag weights and draggable views

Draggable Views

Draggable Views provides a plugin for Views which produces a sortable list of items

The sorting system is the same one used to order Blocks and Terms in the normal Drupal interface

6

Page 7: Drupal meetup presentation   flag, flag weights and draggable views

Nodequeue?

Anybody heard of Nodequeue? Doesn’t it do the same thing already?

Yes - but only for nodes. And the admin interface is “fixed” to use autocomplete for node titles.

7

Page 8: Drupal meetup presentation   flag, flag weights and draggable views

Configuringa Flag

Flag comes with a “bookmark” flag by default. This provides a per-user node flag.

Let’s create a new one called sidebar_items.

8

Page 9: Drupal meetup presentation   flag, flag weights and draggable views

Configuringa Flag

The next form has a whole load of settings, but fortunately they’re all pretty simple.

You’ll need a Title, Flag and Unflag text, enabled Global checkbox, enabled node types and appropriate Display options.

9

Page 10: Drupal meetup presentation   flag, flag weights and draggable views

Configuringa Flag

And that’s it!

10

Page 11: Drupal meetup presentation   flag, flag weights and draggable views

Admin View - Page11

Page 12: Drupal meetup presentation   flag, flag weights and draggable views

Admin View - Attachment12

Page 13: Drupal meetup presentation   flag, flag weights and draggable views

Other Admin Options

13

Exposed Filters for Node Title, Type, Post Date, etc

More fields on the table for sorting

Imagefield thumbnails

Page 14: Drupal meetup presentation   flag, flag weights and draggable views

The Admin View14

Page 15: Drupal meetup presentation   flag, flag weights and draggable views

The Admin View15

Page 16: Drupal meetup presentation   flag, flag weights and draggable views

So how does it look?

16

Well, how do you want it to look? :-)

Page 17: Drupal meetup presentation   flag, flag weights and draggable views

Example Result

17

This just shows one way of using Flags, Flag Weights and Draggable

Views.

Page 18: Drupal meetup presentation   flag, flag weights and draggable views

Any questions?

18

Slides available:http://bit.ly/flag-slides

Photo:http://flic.kr/p/5KrE8c

by “pinprick”