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.
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.
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 (www.weather.com). 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.
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!
You can also follow along with the screencast if you like.Create content types
- Name (title field)
- Biography (body field)
- Photo (image field)
- Albums (Entity Reference referencing the album content type)
- Title (title field)
- Album Artwork (image field)
- Year (text field)
- Tracks (Entity Reference referencing the track content type)
- Title (title field)
- MP3 (file)
- Length (text)
- Writer (text)
- 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
We can now create artists, albums and tracks but the workflow isn't ideal.Default workflow (cumbersome)
- Create all tracks for an album
- Create the album (reference the tracks created above)
- Create the artist (reference the album created above)
Repeat for each new album (or artist / album)A more ideal workflow
- Create an artist, create albums and tracks directly from the artist edit screen!
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.
- Enable references dialog
- Modify albums field settings on the artist content type
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.
- Enable inline entity form
- Modify tracks field settings on the album content type
I will only briefly touch on this topic since it could be a whole other blog post.
- Modify the view mode display for artist and album
- 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?
Drupal.org provides an amazingly flexible issue queue and is the backbone of most community activity around code, community, policies, drupal.org 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 drupal.org 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.
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: https://github.com/drupal-media/entity_embedGeorge 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 Drupal.org 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 Drupal.org 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.
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.
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.
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.
At DrupalCon Austin 2014, we officially kicked off the reimagination of Drupal.org 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:
- Grow Drupal community engagement
- Grow adoption of the Drupal project
- Make it easier to build Drupal
- Be the home of the Drupal community and primary destination for collaboration, education and relevant information and answers
- Provide tools to help coordinate community development of Drupal and related projects by removing barriers, retaining resources and more
- Demonstrate Drupal’s capabilities and advantages, and promote it as an organizational solution
- Encourage and enable people to develop themselves and their careers over time
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 Drupal.org 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
- 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?
- 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?
- Since your the lead developer of NodeSquirrel, give us the pitch :)
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).
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!
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.
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).
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.
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.
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!
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.
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:
- Make it so that the View shows also the username of the article author
- Make is so that the View shows only articles authored by the logged in user
- 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%
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?