Planet Drupal

Subscribe to flux Planet Drupal - aggregated feeds in category Planet Drupal
Mis à jour : il y a 45 min 19 sec Creating a Custom Breakpoint in Bootstrap-Sass

mar, 24/06/2014 - 23:00

Bootstrap is our go to base theme, but what happens when the grid the client asks for has different width, or more break points? Using Bootstrap-Sass creating a custom grid is possible in a manner that can be copied and adjusted from one project to another. As example for this post, and for your future reference you may follow the live demo and repository that changes Bootstrap to work with five breakpoints (tip: use Resizer for easy viewport resize).
Note that example is using Jekyll for simplicity, however the same technique can be used on Drupal.

Continue reading…

Catégories: Elsewhere

Metal Toad: Toadcast 23!

mar, 24/06/2014 - 22:30

Photo Credit: Tyler Ward

In Toadcast 23 we talk with Tom Martin and Dan about Drupalcon 2014, Texas Food, Heat, Sessions from Four Kitchens, Adam Edgerton, Roaches, Austin City Life, Pet Talk, Presentations by Dan, Drupalcon 2015, The Definition of Decimate, Future of Drupal, & Expansion of Drupal Crowd.

Catégories: Elsewhere

Mediacurrent: Migrating The World's Largest Website onto Drupal -

mar, 24/06/2014 - 19:39

At Drupalcon, we had the opportunity to share with the community a case study featuring The Weather Channel (TWC), which has one of the most highly visited web sites in the world ( And, it’s certainly among the largest Drupal sites under development.

The approach was to break the engagement into two phases, the first to address editorial concerns and the second to replace legacy systems and take over the front end serving.

Catégories: Elsewhere

Aten Design Group: Getting Started with References in Drupal

mar, 24/06/2014 - 19:25

Slated to be part of Drupal 8 core, Entity Reference is a field type module you should be familiar with now. For experienced Drupal users, the reference field is probably not a new concept. Regardless of your Drupal skill level, I hope to give a practical example of how the Entity Reference module can be utilized and introduce a few other modules that greatly improve its usability.

The Entity Reference module provides a new field type that allows entities (nodes, taxonomy terms, etc.) to create a reference (or connection) to each other. The need for references usually comes from needing to create content with complex data points (or fields). My example is for Aten Records (our company's fake record label). Aten Records needs to catalog all of their artists, albums and tracks. Imagine trying to store every album and track for an artist in a single content type (artist for example). It would be challenging because of the data we need to collect for each album and track. It becomes much easier to imagine three content types (artist, album & track), but we need a way to connect the three content types together. Entity References can help!

In this example I am using Drupal 7 core and the Entity Reference module.

Creating the example

You can also follow along with the screencast if you like.

Create content types
  • Artist
    • Name (title field)
    • Biography (body field)
    • Photo (image field)
    • Albums (Entity Reference referencing the album content type)
  • Album
    • Title (title field)
    • Album Artwork (image field)
    • Year (text field)
    • Tracks (Entity Reference referencing the track content type)
  • Track
    • Title (title field)
    • MP3 (file)
    • Length (text)
    • Writer (text)
Review entity reference field settings
  • Make sure it is pointing to the correct entity type (node in our example)
  • Make sure it can reference the correct content types
  • Make sure it can reference a unlimited number of options
Creating Content

We can now create artists, albums and tracks but the workflow isn't ideal.

Default workflow (cumbersome)
  1. Create all tracks for an album
  2. Create the album (reference the tracks created above)
  3. Create the artist (reference the album created above)

Repeat for each new album (or artist / album)

A more ideal workflow

Using a couple contributed modules, (references dialog and inline entity form), we can greatly improve this workflow.

  1. Create an artist, create albums and tracks directly from the artist edit screen!
References dialog

References dialog launches a new content create form in a modal window on the page where you are currently editing content. I've chosen this for album, so new albums can quickly be created without leaving the artist edit screen.

  1. Enable references dialog
  2. Modify albums field settings on the artist content type
Inline entity form

Inline entity form embeds the form of the referencing entity directly on the page. I've chosen this for tracks so we don't have modals in modals, because we already have an album modal window open at this point.

  1. Enable inline entity form
  2. Modify tracks field settings on the album content type
Displaying referenced content

I will only briefly touch on this topic since it could be a whole other blog post.

  1. Modify the view mode display for artist and album
  2. For each entity referenced field, choose "show rendered node"

The sky is really the limit with how you use references in a project. Imagine a social site with profiles referencing work experience, a soccer club website with teams referencing players, or a hiking website with trails referencing other nearby trails. What other tips do you have for folks just getting started with Entity References? What other modules improve usability of Entity References?

Catégories: Elsewhere

Gábor Hojtsy: How to manage issues according to your priorities

mar, 24/06/2014 - 19:05 provides an amazingly flexible issue queue and is the backbone of most community activity around code, community, policies, itself and so on. Each issue has a priority value which can be one of Critical, Major, Normal and Minor. Even more interesting is the tagging system we use with some commonly used tags like 'beta blocker' or 'beta target' or 'revisit before release' which add extra priority on top of the single value field. The issues however don't lend themselves to supporting working on your priorities. Here are some options and tools I used so far that help solve this issue.

Catégories: Elsewhere

Palantir: DrupalCon Austin: a Recap

mar, 24/06/2014 - 17:49

Anyone even remotely connected to the Drupal community knows how special DrupalCon is. The community, code sprints, co-mingling of ideas, and, of course, coffee. Thousands of people from around the world getting together – in Austin, no less – to share, learn, and have fun. Eleven of us went to Austin this year, and now we've had some quality time to reflect, we wanted to share our thoughts and experiences.

Kelsey Bentham

I had a couple of goals going into DrupalCon I wanted to learn some new things, meet some new people, and eat some Tex-Mex – boy, did I accomplish those goals. I am now even more excited about Drupal 8 than I was when I left, and I was pretty excited about it before. I have also learned a lot about how this community functions and continues to grow.

I have to admit, I was a little apprehensive about going to my first big tech conference; thankfully all my worries were for nought. I met some amazing people, and had some great discussions about what people in the community are doing and how they are doing it. I thank you all for making this a wonderful experience. Just so you know I plan on using all of your knowledge and experience to enhance my own. As for the Tex-Mex, it is something I will never eat again outside of Texas.

Tom Jones

Going into DrupalCon, I was excited for the opportunity to learn and exchange ideas with others in the Drupal community – plus catching up with a few clients. And, yes, indulging in Austin’s local culinary adventures.

Being my first DrupalCon, I was impressed by the veterans welcoming new folks. Drupal is truly an inclusive community, and gratitude is the one contribution we can all make going forward, even if you never commit a line of code.

The highlight of the week, and what made the greatest impression on me was spending time with our clients. We employ an integrated approach on projects, and our clients really become part of the team. Seeing them at DrupalCon was really like catching up with old friends.

We know our clients are great, but having the opportunity to observe them at DrupalCon gave me an entirely new perspective. It was inspiring to see their passion first-hand, and how they are using Drupal to achieve their mission. Whether higher education, publishing or medical, our clients are purpose-driven, and it is incredibly gratifying to “empower and enable” them each and every day.

Ryan Wagner

Having been to many Drupal Camps around the east coast, I was incredibly excited to finally attend my first DrupalCon. Being surrounded by so many other people who had come together to learn, share, and talk about something so positive was an excellent experience. My stated goals at the outset were to meet good people, learn new things, and indulge in some local cuisine; I would say that my goals were met or exceeded in all respects. Addendum: Any dietician would likely lift eyebrows at how enthusiastically I tackled the last goal.

Aside from excess amounts of food, I borrowed from DrupalCon an incredible amount of new knowledge and a fresh appreciation for how many people contribute so much time and effort into the Drupal project. With the help of the mentors, I’m now proud to say that I’ve started down the path of my own (small for now) contributions towards the project, and I’m hopeful to make many more.

Steve Persch

I try to focus my Drupalcon experience around catching up on the latest big ideas in the community, and then getting small concrete progress on those ideas. This year that meant working on pull requests to the the Drupal Media team's Entity Embed module after seeing two core conversations that referenced it. Jeff Eaton's Battle for the Body Field Core Conversation highlighted the need to separate the storing and rendering of transcluded data. Dave Reid and Janez Urevc talked about how Entity Embed would be the module in Drupal 8 to carry that idea forward. You, too, can dive in here:

George DeMet

While I didn’t get a chance to attend too many sessions at this DrupalCon, I spent a lot time doing Drupal community work for both the Content Working Group and the Drupal Community Working Group.

The Content Working Group and user experience coach Whitney Hess kicked off user research that will inform a revamp of next year. This is a really exciting project intended to help draw new audiences to Drupal, as well as improve the experience for existing users of the site. Look forward to hearing more in the months between now and DrupalCon Amsterdam.

The Community Working Group is responsible for helping to uphold the Drupal Code of Conduct and maintaining a friendly and welcoming community for the Drupal project. In Austin, we approved a conflict resolution policy designed to put process around conflicts that might arise within the community and cannot be easily resolved by the affected parties.

Erynn Petersen’s keynote which made a strong case for the role of diversity in healthy and productive communities, was one particular highlight of the conference for me. While Drupal has a more diverse community than many others in the tech industry, we still have room for improvement. I’m hopeful that the work that both the Content and Community Working Groups are doing will ultimately help to make the Drupal community a more welcoming place for everyone.

Ken Rickard

I spent my time in the DrupalCon “hallway track” having conversations, introducing people and making connections. There were two things that stood out to me: 1) the folks who have been going to DrupalCon for a long time (this was my 15th) really try to reach out to newcomers, and I think this should be an area of focus. Hat tip to Andrea Soper for leading mentorship sprints designed to onboard new developers. 2) There was a sizable Latin American presence at the conference, the first time I’ve really noticed that. I met people from Columbia, Argentina, Bolivia, Costa Rica, and Mexico; and they are all very excited about DrupalCON Bogota next year, and that enthusiasm is spreading.

I also have two main highlights: 1) Inigo San Gil’s performance at the DEIMS session. He was fabulous, and he really nailed the importance of the project and reinforced why we took it on. 2) After a week of convincing, I did finally ride the mechanical bull.

I also had numerous great conversations with people at the booth, centered around the question “What can we do to help make you successful?” I talked to large and small companies, non-profits, schools, libraries, and hospitals and the topic was the same from each: We’re undertaking something new and we need it to be great. We think Drupal can do that for us, and we need someone who can help us realize its potential.

Shawn Smith

With it being my first DrupalCon, I didn’t quite know what to expect from the show or the community at-large. Granted, I had heard many amazing things about the Drupal community since so many Palantiri are so deeply rooted in it, but first-hand experience is always different, regardless of expectations. What a joy all around! The entire atmosphere was welcoming, interesting, fun, and so much more. The show itself was relaxed yet specific. Often at traditional trade shows, there’s a lot of awkward, fluffy networking that leads nowhere. DrupalCon was different. There were no hard sells. Nothing came off as slimy or smarmy. Just good people, good conversation, and good feelings. If I were to pick a singular experience as a highlight, it’d be Trivia Night. Ken suggested I be a runner, and I’m so glad I accepted that role. Met a lot of nice folks, learned more about Drupal, and had a lot of laughs. Thanks for an amazing first impression!

Chris Zietlow

While I’ve been to many local and regional Drupal Camps, Austin was first time attending a Con. I boarded my plane with the expectation that a DrupalCon is just a Drupal Camp turned to 11. Austin was far beyond my expectations of 11. I was hoping to spend a lot of time in sessions, talking to some of the community elites, and generally absorbing as much knowledge as I could. What I couldn’t begin to image was the scale and amount of awesome of the Drupal community. It was thrilling to experience that in person, rather than via forum posts or IRC.

I’ve read the attendance numbers for previous cons and have even seen the infamous group pictures with thousands of people, but wasn’t expecting to feel as welcomed as I was around every corner. In many other open source communities, it’s easy to become just a number and hide in the background, especially as they grow and scale. While I may have been attendee #533, the entire time I was there I felt like an integral part of Drupal. Come for the community, stay for the code as they say.

This has me even more excited for Drupal 8. I’ve been excited by the new architecture, and technical debt that’s being cleaned up, but now I’m waiting to see where our amazing community can take the newest version of Drupal.

Catégories: Elsewhere

Drupalize.Me: Web Profiler in Drupal 8

mar, 24/06/2014 - 16:00

Profiling your site is extremely useful not only for debugging and performance testing but also for learning about how your site handles requests.

Symfony 2 comes with a bundle (like a Drupal module but for Symfony) called WebProfiler Bundle which collects information about each request made to your application and allows you to visualize it in the browser.

Drupal 8 doesn’t include the Web Profiler bundle in core. However, there already is a contrib module for it. Make sure to install any dependencies before enabling the module.

The module will render a fixed bar at the bottom of each page for users with the View webprofiler toolbar permission. The bar provides a summary of the collected data from the profiler.

Catégories: Elsewhere

Acquia: Why Drupal? First Principles

mar, 24/06/2014 - 14:12

This post will give us some common ground on which I can build my case for Drupal. To get started, we’ll need working definitions of success in business today, the nature of open source software, and a quick explanation of Drupal itself. In subsequent posts, we’ll explore specific concepts and examples of how Drupal enables success because it is open source software at scale – a powerful combination: the empowerment of freedom multiplied by an ecosystem of thousands of service providers, tens of thousands of developers, and millions of sites online.

Catégories: Elsewhere

Pronovix: How to get the community to write your documentation

mar, 24/06/2014 - 10:28

In the Drupal community we excel at sharing code, but we are terrible at sharing documentation. I’ve been trying to rally the Drupal community around a standard for reusable documentation for a few years now. But to get people to collaborate we needed to invent a new tool that makes it easy to create, reuse and share documentation between sites and the Drupal project at large. We have built that tool, it’s called WalkHub.

Catégories: Elsewhere

Drupal Association News: User Research: stakeholder workshop outcomes

mar, 24/06/2014 - 07:23

At DrupalCon Austin 2014, we officially kicked off the reimagination of with a full-day workshop with Drupal Association staff, Working Groups, select board members and advisors, facilitated by our user experience coach Whitney Hess. In the morning, we did the serious business of defining our objectives, target audiences, metrics for success (KPIs), partners and competitors, and then in the afternoon broke out into teams to brainstorm provisional personas, use case scenarios, and a blue-sky set of features. These are the hypotheses that we will now test in our user research.

Here are a few outcomes of the day:

Objectives for the Drupal Association:
  1. Grow Drupal community engagement
  2. Grow adoption of the Drupal project
  3. Make it easier to build Drupal
Objectives for a new
  1. Be the home of the Drupal community and primary destination for collaboration, education and relevant information and answers
  2. Provide tools to help coordinate community development of Drupal and related projects by removing barriers, retaining resources and more
  3. Demonstrate Drupal’s capabilities and advantages, and promote it as an organizational solution
  4. Encourage and enable people to develop themselves and their careers over time
Metrics for success (in no particular order): ↑ % completion of user profiles ↑ # Drupal sites ↑ # Authenticated user logins (globally) ↓ Average issue lifetime ↑ # site visitors (globally) ↑ Traffic to marketing content ↑ Prospect captures ↑ $ received / product category ↑ $ spend by partners y/y ↑ # contributors ↑ # code contributions / contributor ↑ # doc edits / contributor ↓ time issue has 'needs review' status ↑ # project downloads ↑ self-reported community satisfaction ↓ single-time logins ↑ # vendors in Drupal marketplace ↓ #/% inactive accounts ↓ #/% inactive projects ↓ # former users ↑ Drupal 8 effect ↑ # sites using specific projects


Despite how busy everyone is at DrupalCon at sessions and in the hallways, we were also able to conduct 11 user interviews with a wide variety of community members. Our user research continues until mid-July, as we interview developers, designers, site-builders, business decision makers, technical leads, content strategists, sysops, marketing managers, evangelists, students, agency heads and more, learning everything we can about what the Drupal community needs to do its best work and what can provide to make that happen.

We are very excited to share the results of our research with you soon.

Thank you for participating in this process with us,

The Drupal Association Staff

Flickr photo by 3oheme

Personal blog tags: user research
Catégories: Elsewhere

Modules Unraveled: 111 Backup and Migrate 3.x with Ronan Dowling - Modules Unraveled Podcast

mar, 24/06/2014 - 07:00
Published: Tue, 06/24/14Download this episodeNodeSquirrel
  • Let’s start out by getting a quick overview of what Backup and Migrate is.
  • What are some of the new features in version 3.x?
    • Files
    • New UI
    • Notes about backups
    • Backup to two places at once
    • Elysian Cron
    • Smart delete
    • One list for all backups instead of a list for each schedule
    • Restore from stored backup or upload
    • Ctools exportable
  • What are some of the limitations of the module?
  • How does this work in conjunction with Git?
NodeSquirrel Plug
  • Since your the lead developer of NodeSquirrel, give us the pitch :)
Episode Links: Ronan on drupal.orgRonan on TwitterBackup and Migrate ModuleGorton StudiosNodeSquirrelTags: 
Catégories: Elsewhere

Drupal core announcements: Core Sprint: Drupal 8 at the Jersey Shore

mar, 24/06/2014 - 04:25
Start:  2014-07-12 09:00 - 2014-07-13 17:00 America/New_York User group meeting Organizers:  crowdcg pwolanin davidhernandez Event url:

Join members of the NJ Drupal Community at our upcoming sprint: Drupal 8 at the Jersey Shore. The event will be held in Asbury Park, NJ and run all day on Saturday, July 12 and Sunday, July 13.

Join like-minded Drupal contributors for two full days of core and contrib sprinting to further advance Drupal 8. We'll have a list of approachable Drupal 8 critical tasks for participants to work on (thanks to remote help from xjm).

Get a ticket on Eventbrite. Attendees will be provided with breakfast, lunch, and snacks throughout the event. Further details about the event can be found at

All attendees should have previously participated in a core sprint and/or have a fully working local environment for developing patches.

We look forward to seeing you at the Jersey Shore!

Catégories: Elsewhere

PreviousNext: The Drupal jack of all trades

mar, 24/06/2014 - 01:08

Last week I was very fortunate to not only attend, but be the keynote speaker for DrupalCamp Singapore! Here are my take aways and keynote slides.

Catégories: Elsewhere

Stanford Web Services Blog: Top 6 things to do while your cache clears on its own

mar, 24/06/2014 - 00:05

Caches are a great tool, they store your website's database and code information in a way that loads much faster. But they DO mean that your changes don't appear right away.

Where are my changes?

One of the things we here at Stanford Web Services get emailed about most frequently is, "Why did my changes disappear when I logged out?" The answer is that the site caches haven't yet been updated, but they will if we wait a little bit (sometimes a few hours or so).

Catégories: Elsewhere

Drupal Association News: 2015 DrupalCon Design Partners Have Been Selected

lun, 23/06/2014 - 23:58

As you may have seen, we recently sent out a call for designers.  We utilized the process we created last year, but with one twist: this year, instead of hiring one designer to produce both of the 2015 Cons, we are hiring two designers to produce Cons for two years!

Our awesome design partner this year, CTI Digital, has been put through their paces producing all the design for both 2014 DrupalCons in Austin and Amsterdam.  While they have done a stellar job, we know this process has proved taxing on their resources, since there was so much cross-over between the deliverables for both cons.  Sorry, CTI!

Learning from this, we have selected two designers for 2015 / 2016, and will be staggering each firm’s workload.  Each designer will produce one Con in 2015 and a second in 2016.

Now to the fun part! 

We were WOWed by all the talented designers who applied, and are so thankful for all the companies that participated. It was a difficult choice, but we have selected Cheeky Monkey Media, out of Canada to work on 2015 Los Angeles DrupalCon and ADCI Solutions, out of Russia to work on the 2015 European DrupalCon (the location of which is yet to be announced…).

We are confident that all of the goodness of community, culture, and innovation will be captured in each of these designers work as we continue to evolve and grow the DrupalCons worldwide!

Congrats to Cheeky Monkey Media and ADCI Solutions! Welcome to the DrupalCon family.

Catégories: Elsewhere

Mediacurrent: Improving the ROI of your Drupal Website

lun, 23/06/2014 - 22:42

Companies are seeing lower success rates on social media and diminishing conversion rates on the web - a trend that has put us all, especially content marketers, in the position to prove the ROI or face severe fiscal cuts. Unfortunately, reporting metrics like “increased impressions” and “better brand awareness” won’t be enough because companies are looking for hard before/after numbers.

Catégories: Elsewhere

Phase2: Open Atrium: The Open Source Enterprise Collaboration Solution for Government

lun, 23/06/2014 - 22:04

In today’s digital world, government agencies are faced with the challenge of determining how best to connect not only internally, but externally with citizens and shareholders. At the federal, state, and municipal levels, agencies coordinate and share information with other agencies, with external communities, and across different levels of government.

As they attempt this coordination, government agencies must meet the collaboration needs of specialized projects, while operating within budget allocations and resource constraints.

“Challenge” may be an understatement. Luckily, a robust and secure toolset exists to successfully connect disparate government systems and constituents.

On Tuesday, June 24th we will be leading a discussion about collaboration in government and how Open Atrium can provide an open source enterprise solution to connect actors and engage citizens in the public sector.

Open Atrium provides an open source, enterprise-grade collaboration platform for government that:

  • Engages constituents with a modern, mobile-friendly experience

  • Streamlines communication and workflows across groups

  • Integrates with enterprise systems

  • Provides the security that allows agencies to restrict access to information on both sides of the government firewall

Mike Potter, Open Atrium’s Lead Architect, and Greg Wilson, Director of Government Practice at Phase2, will discuss some of Open Atrium’s key features that make it a great fit for collaboration in government, including:

  • Secure document sharing and collaboration:  Securely keeps information in one place, unlike email.

  • Time management tools: Manage and monitor project activities with calendars and project tracking tools.

  • Security and access control: A robust access control system that outperforms any other open source solution.

  • Online communities and communication: Launching open or private discussions is simple.

  • Citizen and stakeholder engagement: Control the content the public sees.

Be sure to grab a seat at tomorrow’s webinar on Tuesday, June 24th at 12 PM EST to learn what Open Atrium can do for your agency!


Catégories: Elsewhere

LightSky: Admins: The Sometimes Forgotten User of Drupal

lun, 23/06/2014 - 20:47

Last week a client asked us to build an image gallery for her website. There wasn’t anything super complex about this gallery, but it needed to have the images categorized via taxonomy and it she needed the ability to reorder the images. So off to the interface to create a content type, view, and pages associated with this gallery.

One thing that I got hung up on was on how to make it so she could reorder the images. This is not an unusual request, and I’ve used almost all of the re-ordering modules there are, yet for some reason, I started off by adding a text field for a “weight” and then figured she could adjust them from there.

I’m not sure why I thought that was a good solution, after all, as a company we pride ourselves on making Drupal as user friendly as possible. Thankfully I realized the error of my ways, and proceeded to promptly scrap the idea. The solution I ended up with was using Draggable Views for her to re-arrange the order of the images, a link in the header of the view to add an image directly and a small (<10 line) module to redirect to the draggable view page after she added a gallery image. What she ended up with was a single interface to manage her gallery, and something that both myself and the client was happy with.

So why do I tell you this story? Because with all of the great flexibility that comes with Drupal, it’s easy to forget about the administrative aspect of a piece of functionality. I think it’s important for everyone to put some thought into how something should work from both the administrative side and the visitors side, and be sure to add some time for that into your budget. The back-end of your site should be as beautiful and easy to use as the front-end and if its not you are doing your clients a huge disservice. I’m glad to see the default Drupal 8 admin interface had a lot of thought regarding usability put into it, but I will save that for a later post.

For more tips like these, follow us on social media or subscribe for free to our RSS feed and newsletter. You can also contact us directly or request a consultation
Catégories: Elsewhere

SitePoint PHP Drupal: Drupal 7: Relationships, Contextual Filters and Field Rewriting in Views 3

lun, 23/06/2014 - 18:00

In this article we will continue exploring the powers of Views and focus on how to use relationships, contextual filters and rewrite field outputs. In a previous tutorial I showed you how to create a new View and perform basic customizations for it. We’ve seen how to select a display format, which fields to show and how to filter and sort the results.

In this article we will go a bit further and see what relationships and contextual filters are - the two most important options found under the Advanced fieldset at the right of the View edit page. Additionally, we’ll rewrite the output of our fields and combine their values into one.

To begin with, I have a simple article View that just shows the titles. Very easy to set up if you want to follow along. And there are three things I want to achieve going forward:

  1. Make it so that the View shows also the username of the article author
  2. Make is so that the View shows only articles authored by the logged in user
  3. Make it so that the author username shows up in parenthesis after the title

First, let’s have the View include the author of the articles. If the View is displaying fields (rather than view modes or anything else), all we have to do is find the field with the author username, right? Wrong. The problem is the following: the node table only contains a reference to the user entity that created the node (in the form of a user ID - uid). So that’s pretty much all we will find if we look for user related fields: Content: Author uid.

What we need to do is use a relationship to the user entity found in the user table. Relationships are basically a fancy way of saying that table A (in our case node) will join with table B (in our case user) in order to retrieve data related to it from there (such as the name of the user and many others). And the join will happen in our case on the uid field which will match in both tables.

So let’s go ahead and add a new relationship of the type Content: Author. Under Identifier, we can put a descriptive name for this relationship like Content Author. The rest we can leave as default.

Now if you go and add a new field, you’ll notice many others that relate to the user who authored the content. Go ahead and add the User: Name field. In its settings, you’ll see a Relationship select list at the top where the relationship identifier we just specified is automatically selected. That means this field is being pulled in using that relationship (or table join). Saving the field will now add the username of the author, already visible in the View preview.

You can also chain relationships. For instance, if the user entity has a reference to another table using a unique identifier, you can add a second relationship. It will use the first one and bring in fields from that table. So the end result will be that the View will show fields that relate to the node through the user who authored the node but not strictly from the user table but somewhere else connected to the author. And on and on you can join tables like this.

Contextual filters

Contextual filters are similar to regular filters in that you can use mainly the same fields to filter the records on. Where contextual filters differ greatly is that you do not set the filtering value when you create the View, but it is taken from context.

There are many different contexts a filter value can come from, but mainly it comes from the URL. However, you can instruct Views to look elsewhere for contexts as well - such as the ID of the logged in user.

Continue reading %Drupal 7: Relationships, Contextual Filters and Field Rewriting in Views 3%

Catégories: Elsewhere

Drupal Easy: DrupalEasy Podcast 133: Top Secret Drupal (Capital Camp and Gov Days)

lun, 23/06/2014 - 16:53
Download Podcast 133

Jessica Dearie (jdearie) and David Stoline (dstol) join Andrew, Ryan, and Mike to talk about the upcoming Capital Camp and Gov Days, taking place on July 30-August 1, 2014 (free for attendees!) We also learn about two top-secret Drupal groups, do a DrupalCon Austin review, and say “Morten” more times than anyone should be allowed to. Not enough for you? How about some Picks of the Week and 5 questions?

read more

Catégories: Elsewhere