Higher Education Notes and Trends for the Week of July 18, 2016

Posted by ImageX Media on July 22, 2016 at 10:07pm

In our weekly roundup of higher education notes and trends, you can usually count on three themes being discussed by the academic community: student demographics, budget constraints, and technology. In this post, we'll expand more on these themes by sharing some of our own insights, and we'll cover a few unique and emerging technology trends across higher education and technology.

Bridging the Communication Gap on Distributed Teams

Posted by ImageX Media on July 22, 2016 at 9:43pm

Of the many things that contribute to the success of a project, communication is the most important. While every project will differ in its requirements, team members, and plan, at the most basic level their goals should always be the same: to add value for the client. Open communication -- that is, the free exchange of ideas, collaboration, and ensuring clarity and direction is the lynchpin that holds a project together in the pursuit of that goal.

Drupal GovCon: Day 3 Recap

Posted by Third & Grove on July 22, 2016 at 8:03pm
Drupal GovCon: Day 3 Recap abby Fri, 07/22/2016 - 16:03

Dropcast: Episode 22 - The Jim Birch Society

Posted by Mediacurrent on July 22, 2016 at 5:25pm

Recorded July 6th 2016

This episode our number one fan, Jim Birch, comes on to talk about his Drupal life and sadly learns how unprofessional his favorite podcast is. With that we recognize how long it takes me to actually get an episode out of the can and into your ears. Bob highlights some blog posts, which derails into a discussion about the Google AMP service, which rolls perfectly in with Ryan’s Pro Project Pick. We discuss the latest Drupal News and of course Ryan brings it home with the Final Bell.

How We Grew a Business from Seed

Posted by Zivtech on July 22, 2016 at 1:35pm
Look for Talent, Not Experience

We got started with the idea to train inexperienced employees out of necessity, as well as from personal values. I had a few different careers before I got into web development. I was a pharmaceutical chemist, and I was also a math teacher. But I never worked at a place where anyone recognized my talent.

I had other jobs, too. In college, I was a telemarketer and did data entry. I was a bright person, but nobody seemed to notice. I always thought that it was a shame that talent goes to waste due to a lack of opportunity for young, unproven workers.

Back then, I wished someone would have given me an opportunity to do something at my level. Instead, I made it happen for myself, and co-founded this company in 2008. We didn't have any money, and back then there were even fewer qualified potential hires in our field. I'm super picky about the quality of the work my company does, and wasn’t willing to hire second rate workers.

We hired a few people and then the economy collapsed. Much of our work went away. We decided that we weren't going to cut anybody. By that point, we’d hired four or five people, and they didn't really have any experience. I was doing most of the billable work, plus teaching people. When the work dwindled, we decided to pay them from our credit cards. About half of those people are still with us, and they're doing great. I'm really glad that we kept them.

The main reason that we started hiring people who didn't really have much or any experience was that we couldn't afford anyone who did. We're not a virtual company; we've always had an office, so we're limited to our local area, and there really were very few good developers. Instead what we did was just bring candidates into the office, make sure everyone communicated, and for our part, we would bring a willingness to teach.

Believe that your people are intelligent, and that you can teach them something, and that they can learn. They might not learn as quickly as you would like sometimes, but if you believe that they will learn, they will.
*SOURCE: http://www.modernsurvey.com/fall2014

Download the full Grow Your Own white paper for free.

Drupal & Bitnami Multiple Environments

Posted by OSTraining on July 22, 2016 at 11:12am

An OSTraining member asked how to setup a bitnami lamp that supports PHP 5.4.

The Bitnami Wamp stacks are available in 3 versions here:

  • 5.5.37
  • 5.6.23
  • 7.0.8

Each of these provides an environment that is preconfigure with a different version of PHP.

5.5.37 comes with PHP 5.5, which you should also use for 5.4 setups. The reason 5.4 is no longer available is because the changes between 5.5 and 5.4 are minimal. You can read more about the changes on the official change log here.

To install the Wamp stack, follow our installation guide.

If you already have a Bitnami Lamp setup, you can install it again. Just be sure to use a different directory location to your original installation. All Bitnami files are contained within these containers, so you can simply install the stack as many times as you like. 

When installing your second stack, you will have to use a different ports for apache, ssl and mysql:

 apache port

Once the installation is complete, you should see this screen:

installed

In this older version of the Bitnami stack, the enviroment doesn't include Drupal. So we will have to install Drupal now.

Download or copy your drupal site to Bitnami\wampstack-5.5.37-1\apache2\htdocs\drupal

Navigate to http://127.0.0.1:8080/drupal/ 

If you are doing a fresh install, you will see this screen:

drupal install

 

 You can access PHPMyAdmin from http://localhost:8080/phpmyadmin/

Friday 5: 5 Structured Data Items that Work for Every Website

Posted by Mediacurrent on July 22, 2016 at 5:47am

We hope the work week is treating you well and that you're gearing up for an even better weekend!

Drupal GovCon: Day 2 Recap

Posted by Third & Grove on July 21, 2016 at 11:43pm
Drupal GovCon: Day 2 Recap abby Thu, 07/21/2016 - 19:43

Live from DrupalCon Mumbai: Meet Acquia Pune!

Posted by Acquia Developer Center Blog on July 21, 2016 at 9:03pm
View from Sinhagad Pune Darwaja

A conversation from DrupalCon Asia DrupalCon Mumbai 2016 with members of Acquia's Pune, India office: Prassad Shirgaonkar, Prassad Gogate, Prafful Nagwani, and Jeffrey A. "jam" McGuire in which we touch on Drupal and community in India, the history of the DrupalCon Prenote, Drupal's multilingual strengths, the Drupal Campus Ambassador Program in India, and more!

jam: We are at the Contribution Sprint day of DrupalCon Asia in Mumbai, wrapping up a great few days for me. Prafful Nagwani, how was your DrupalCon?

Prafful Nagwani: This is my third DrupalCon and this was fantastic. Even more so because this is happening in India, in our own backyard, it has been really, really great the way it’s been organized. The sessions, everyone coming in, meeting each other and stuff, it’s been fantastic.

jam: So I would like to point out ... really a huge thank you to the Drupal Association and everyone involved in the organization because it was incredibly smooth and I’ve been to cons in Europe and America that were nowhere near as well-organized so: fantastic. Thank you Drupal Association.

Prafful Nagwani: Thank you.

jam: Prasad?

Prasad Shirgaonkar: Yes.

jam: How was your DrupalCon?

Prasad Shirgaonkar: It was a dream come true for me. I first did a DrupalCon in London in--I think it was 2011 or 12--and I’ve seen you doing the Prenote. I had met Jacob [Singh] and Dries with whom I work now. From that time, I wanted to do a Prenote with you and I wanted to have that done in India and it happened.

jam: Wow, that’s cool! So we did a Prenote in London called ... so there’s a Dickens’ story called A Christmas Carol and we did a parody of A Christmas Carol and we had the Ghost of DrupalCon Past and the Ghost of DrupalCon Present and the Ghost of DrupalCon Future and it was hilarious and we got chx, the contributor C-H-X to be the Ghost of DrupalCon Past and he was hilarious ... and the whole thing actually ...Prenote I’m so glad you were there! We never talked about this. So Prasad and I organized the Prenote which is a DrupalCon tradition now where it’s an opening introduction sort of a welcome to DrupalCon before Dries’ Driesnote. Prasad and I, as well as Adam Juran and Campbell Vertesi and Parth Gohil and Ashwini Kumar; we wrote it as a team together. We were very concerned frankly about making sure it would be funny in India, right? So Prasad and the Indian team hooked us up with great jokes and concepts and I think we rode the line really well of ... frankly, I don’t know everything that’s going to be offensive in India, right?

Prasad Shirgaonkar: Absolutely, absolutely.

jam: So we were really concerned.We wanted to be funny maybe even edgy, right, but not upset people. So how did you feel when we did tongue twisters with an India accent?

Prasad Gogate: Absolutely that was amazing. I think everybody enjoyed that and people probably were not expecting that. So it was really a surprise for them which was obviously a good surprise. Overall, I think DrupalCon in India has been an awesome experience here now. I think it is a dream come true for the entire India community because – and most important is I think the India community has started getting recognized and it’s growing. That’s why – I think that is more important.

jam: So we didn’t quite managed to do this yet. Please introduce yourself to everyone.

Prasad Gogate: I am Prasad Gogate. I work from Pune for Acquia.

Prasad Shirgaonkar: I’m Prasad Shirgaonkar. I work for Acquia from Pune from my home.

jam: So you’re Prasad zero, right?

Prasad Shirgaonkar: Yes.

jam: You’re Prasad one?

Prasad Gogate: Yes.

jam: Okay.

Prafful Nagwani: Hi. I am Prafful Nagwani and I work for Acquia from Pune office. I have been in Drupal since - eight years now since Drupal 6. Yes.

jam: How did you discover Drupal?

Prafful Nagwani: It happened – I got a job and they said that you need to work on something called PHP. I never worked on PHP until then. So I said, “Okay. Let’s try it out.” Since then, I have been with Drupal. I never worked – before that I was totally working on Microsoft Technologies. I never worked on any of the other open source things. I knew about Joomla. I had read about Drupal, but that’s how my experience started and since then I’m here. I’m not going anywhere.

jam: So eight years. How long have you been doing Drupal, Prasad?

Prasad Shirgaonkar: Ten years, since Drupal 4.7.

jam: I installed Drupal 4.6 but I didn’t really do anything with it.

Prasad Shirgaonkar: I did my first site. Actually, I discovered Drupal because I wanted to do my poetry website in Mahrati and back in 2005, 2006, Drupal was the only CMS which supported non-English characters.

jam: Wait, wait. The only CMS?

Prasad Shirgaonkar: Yes. So I had downloaded a couple of others and they didn’t support Unicode characters really well. So Drupal was the only one which supported Unicode ever since its birth actually.

jam: Right. This is a great segue-way into: Hey, Drupal 8 has been released and the multilingual internationalization support is unbelievable! If anybody hasn’t tried this yet, to get a fully, fully, fully translated site in Drupal 7, you couldn’t because there are certain things, variables and certain things that you couldn't touch ... but you could come the very, very closest by installing somewhere between 21 and 27 modules, right?

Prasad Shirgaonkar: Yes.

jam: Hands up who knows how many modules you have to install into Drupal 8 to make it fully multilingual? Every single thing translatable, how many modules do I have to install?

Prasad Shirgaonkar: [faint] Nothing apart from core ...

jam: No. Give me a number. How many modules?

Prafful Nagwani: Three.

Prasad Shirgaonkar: Four.

jam: I thought you guys work with Drupal. The correct answer is zero modules. So because core has?

Prasad Gogate: Multilingual.

jam: Right. Four modules that you turn on ... so amazing. So to do that site today, right, would be even easier. So Prasad, how long have you been doing Drupal?

Prasad Gogate: Since four years now, four plus years. So I was introduced when I started working for a company it was like first project for me and Drupal. I never came across it. So from that stage, I learned and then four years I have been working.

jam: What’s your favorite thing about Drupal?

Prasad Gogate: Building sites faster.

jam: Okay. What technologies did you work in before?

Prasad Gogate: It was Arc.js and Microsoft.

jam: Okay. Do you have a favorite Drupal module?

Prafful Nagwani: That’s a tough one. That’s a tough one. I think I like Views and Panels. I would go for those.

jam: Okay.

Prasad Shirgaonkar: Views, all the way Views and just Views: every sub-system, all the ecosystem around Views.

jam: Right. Another plug for Drupal 8, Views was the key differentiator for us since Drupal 5 that really sets up apart from other CMSs as well as our multilingual support apparently. Now, it’s in core, too, which means we can actually abstract it out, make other interfaces, another tools rely on it. That’s pretty cool.

This is the Acquia Pune office. We had an Acquia India sort of a gathering as part of DrupalCon the other day. How many people work for Acquia India now?

Prasad Gogate: Around more than 25.

jam: So three, four in Pune?

Prasad Gogate: Four in Pune.

jam: How many in Delhi?

Prasad Gogate: The rest, everyone is Delhi.

jam: So when is the Pune office going to overtake Delhi and become the true center of Acquia India?

Prasad Shirgaonkar: As far as leadership is concerned, that is the true center right now. Thought leadership is concerned, that is but number-wise who cares about quantity, when quality is there? ;-)

jam: So one thing I’ve noticed about the Indian community is that India is such a huge, huge, huge, huge place. I’ve met really wonderful local community leaders from all different parts of the country and there’s not a national organization per se, but it feels to me like the communication between the different groups is actually pretty strong. What’s up in Drupal today in India?

Prasad Gogate: In terms of work? You mean Acquia India or overall ... ?

jam: Drupal in India.

Prasad Gogate: I think we have been working in two various sectors. Mostly I think more of the SI and big companies are also getting involved and lot of commerce and contributions are happening. So I think people are becoming more and more knowledgeable, I would say. More and more awareness is increasing which is obviously a good thing and growth definitely is the word, I would say.

jam: Growth?

Prasad Gogate: Yes.

Prasad Shirgaonkar: I think about eight years ago we had very small pockets in Pune, in Delhi and possibly in Ahmedabad ... and in IIT Mumbai obviously.

jam: Ahmedabad was the first user group I think in India.

Prasad Shirgaonkar: Yes. That was the first user group.

Prafful Nagwani: First Drupal Camp in India was Ahmedabad in 2008.

Prasad Shirgaonkar: 2009 was in Pune.

Prafful Nagwani: Pune. That 300 people attended the 2009 and I think we had someone from US visiting and talking there.

Prasad Shirgaonkar: Yes. It was Berry ...

jam: Addison.

Prafful Nagwani: Addison Berry.

jam: You said Barry and I was about to say Barry Jaspan but no, and that’s when she was travelling around on the Knight Foundation grant.

Prasad Shirgaonkar: Yes. We had a code sprint actually in 2009 at that time in January, I remember. That was my first community interaction in Pune where I met Prafful and a lot of - Dipen. We have been ever since doing Drupal camps. Prafful has been – Prafful and Dipen had been like instrumental in setting up community. Prafful drives community like – it’s his own like homely household duty and he gets everyone together. He gets like – yes, he literally, many of the times he shouts at people if they are not doing work.

Prafful Nagwani: There are a lot of community leaders in India. I think the good part with India that’s happening is everyone shares things with each other. So if there is a camp that’s happening in Pune, I’m definitely--I have seen this and we have done this--Delhi comes to help and Bangalore comes to help and we share things. We share resources: "Okay. This is how we did the budget. This is how we did the sponsor. This is the users. This is my user group. Go ahead. Mail them." So I don’t have to start from scratch. Anyone in India wanting to do a Drupal camp, they have a head start. There are people who help out.

jam: I see.

Prasad Gogate: I think that is the community spirit which is actually shown that everybody wants the camp to be successful no matter where it is.

jam: I’ve heard about a lot of that happening and for example Parth Gohil, he has an actual job to just help as many people as possible. Someone came up to me yesterday at the DrupalCon and told me ... he told me a Veda in Sanskrit and he said open source is essential. It’s absolutely the best possible fit for Indian culture because giving and sharing are our core values as a nation and the Veda he read me was something like, "Give a man food and he’ll be satiated for a few hours but give him knowledge," right, and of course it was put much more elegantly but essentially, "knowledge will help you fill your life forever." I’m definitely going to use that in slides with the proper Sanskrit on it forever because it was so moving. Anyway, I’m having an absolutely splendid time in India just being so impressed with the Con and with the community, the number of young people. Frankly, can you talk a little bit about the gender balance in the developer community in India? I’ve seen a lot of women in terms of percentage much, much more than I see in a lot of communities around the world.

Prafful Nagwani: Yes. I think good thing happening over here is that the community overall has been pretty much welcoming everyone into the community and ready to help. As it was said by Danese in her keynote like people here have open minds. Nobody is above someone or below someone. We are all at equal level and that is what is driving people to get more into getting started with community. So for an example, we started doing meet-ups regularly in Pune and over a period of six months we have about 400 attendees, aggregated over six months. Lot of these, I think a lot of these were women. Yes. They really feel a part of it because it’s the community that drives things together, right?

jam: In the west, in open source and it’s a known problem, we have a diversity problem, very, very often. Here, I don’t see that in terms of religion and gender and age. I’ve seen a real – I’ve seen people who are definitely in their 60s at DrupalCon and definitely seen people in their early 20s or younger. I’m very impressed by that. The places that I’ve seen that before are places like Bulgaria. So post-communist countries who have a really strong engineering tradition, a really strong educational tradition over decades. So anyway, well done India because it’s great. It’s very inspiring.

What’s next for Drupal in India?

Prasad Shirgaonkar: We strongly believe that there should be a nationwide meet-up every year if not DrupalCon every year in India.

jam: So I know a guy who would like to be invited if you’re doing anything interesting I can – I’ll introduce you.

Prasad Shirgaonkar: Yes, yes. Please, please do.

jam: So Acquia Pune, thank you guys so, so, so much for taking the time to talk with me. I really can’t wait to see you again soon. Anything, any last words, anything you want to promote, push, say?

Prasad Gogate: Yes. I mean thanks to you for this and definitely, we would expect that you come to Pune once but one thing that probably I want to mention it over here is one of the important things in the Drupal community that recently is happening is more and more educational organizations have started taking interest and I think that is the root. I mean if we start giving education for Drupal from that stage, I think we’ll build a definitely a very good community.

jam: I’m glad you brought that up because I had forgotten, one of the very impressive things that I’ve seen here in India is huge community effort to bring Drupal into high schools and into universities and this is another challenge that I’ve – the efforts that I’ve been involved in, it’s been very, very difficult for us. India is now producing young software engineers who know Drupal and who like Drupal and it’s really, really exciting that you are solving the pipeline problem and everyone else out there, you need to come and see what the Indians are doing because it’s just, just right. Catch them at 15, 16. Get them excited about the web and we can have them. Prasad, shameless plug?

Prasad Shirgaonkar: No. It’s exactly the same thing I was going to say. The universities and colleges are so important and we need to have Drupal over there. So we are – actually we are in talks with IIT. They have open education resources project where they have a software project, software education translated to like 15 Indian languages and we are planning to provide a Drupal content to them. So that way, Drupal will reach to the most - remotest corner of India in their own language.

jam: Please let me know when that is happening. I’d love to help promote that.

Prasad Shirgaonkar: Absolutely.

jam: Prafful?

Prafful Nagwani: Again, the focus is on the education systems. So India community recently started the DCAP program, the Drupal Campus Ambassador Program which is in pilot phase. I think what we need to immediately do and we are trying to do is get students connected to people and they know where to go. They are not left somewhere looking around, okay, what to do next. That is where we lose them.

jam: Take them by the hand and bring them to the goal.

Prafful Nagwani: Show them the way. Show them. If they take Drupal as a career, definitely a good choice for them but we need to tell them, yes, Drupal has a career option. It’s not that only Microsoft or other technologies have that.

jam: Listen, we run 2% of the web, 5% of sites with identifiable CMS and it’s only going to get bigger. You’ve got a job here. ... Prafful.

Prafful Nagwani: Thank you so much.

jam: Prasad.

Prasad Shirgaonkar: Thank you so much.

jam: Prasad.

Prasad Gogate: Thank you so much.

jam: Zero, one. Thank you guys for taking the time to talk with me. It’s been really, really great to spend time together. I can’t wait to see you next time. Thanks, guys.

Prasad Shirgaonkar: Thanks.

Prafful Nagwani: Thanks.

Prasad Gogate: Thank you. Bye.

Skill Level: BeginnerIntermediateAdvanced

Blog design refreshed

Posted by Janez Urevc on July 21, 2016 at 6:52pm
Blog design refreshed

Today I am very excited! A while ago I asked my friend David Ličen to help me improve appearance and UX for my personal blog. He carefully observed my desires and added some of his own ideas. When we agreed on the initial mock he proceeded with the theme implementation.

He finished his part a while ago. I needed to tweak few other things on the back-end too, which took me way too long to do. Today I finally decided to finish this and deployed the changes to the live website.

How do you like it?

slashrsm Thu, 21.07.2016 - 20:52 Tags Drupal Enjoyed this post? There is more! janezurevc.name runs on Drupal 8! We had great and productive time at NYC sprint! Sam Morenson is thinking about media in Drupal core

View the discussion thread.

City of Boston launches Boston.gov on Drupal

Posted by Drupal Blog on July 21, 2016 at 5:00pm

Republished from buytaert.net

Boston.gov's new homepage

Yesterday, the City of Boston launched its new website, Boston.gov, on Drupal. Not only is Boston a city well-known around the world, it has also become my home over the past 9 years. That makes it extra exciting to see the city of Boston use Drupal.

As a company headquartered in Boston, I'm also extremely proud to have Acquia involved with Boston.gov. The site is hosted on Acquia Cloud, and Acquia led a lot of the architecture, development, and coordination. I remember pitching the project in the basement of Boston's City Hall, so seeing the site launched less than a year later is quite exciting.

The project was a big undertaking, as the old website was 10 years old and running on Tridion. The city's digital team, Acquia, IDEO, Genuine Interactive, and others all worked together to reimagine how a government can serve its citizens better digitally. It was an ambitious project as the whole website was redesigned from scratch in 11 months; from creating a new identity, to interviewing citizens, to building, testing and launching the new site.

Along the way, the project relied heavily on feedback from a wide variety of residents. The openness and transparency of the whole process was refreshing. Even today, the city made its roadmap public at http://roadmap.boston.gov and is actively encouraging citizens to submit suggestions. This open process is one of the many reasons why I think Drupal is such a good fit for Boston.gov.

Tell Us What You Think form

More than 20,000 web pages and one million words were rewritten in a more human tone to make the site easier to understand and navigate. For example, rather than organize information primarily by department (as is often the case with government websites), the new site is designed around how residents think about an issue, such as moving, starting a business or owning a car. Content is authored, maintained, and updated by more than 20 content authors across 120 city departments and initiatives.

Screenshot of Towed Cars page

The new Boston.gov is absolutely beautiful, welcoming and usable. And, like any great technology endeavor, it will never stop improving. The City of Boston has only just begun its journey with Boston.gov—I’m excited see how it grows and evolves in the years to come. Go Boston!

Panel on stage at Boston.gov launch

Dries on stage at Boston.gov launch

Dries and Boston mayor, Marty Walsh

Last night, there was a launch party to celebrate the launch of Boston.gov. It was an honor to give some remarks about this project alongside Boston mayor, Marty Walsh (pictured above), as well as Lauren Lockwood (Chief Digital Officer of the City of Boston) and Jascha Franklin-Hodge (Chief Information Officer of the City of Boston).

City of Boston launches Boston.gov on Drupal

Posted by Dries Buytaert on July 21, 2016 at 4:50pm
The before and after of Boston.gov

Yesterday the City of Boston launched its new website, Boston.gov, on Drupal. Not only is Boston a city well-known around the world, it has also become my home over the past 9 years. That makes it extra exciting to see the city of Boston use Drupal.

As a company headquartered in Boston, I'm also extremely proud to have Acquia involved with Boston.gov. The site is hosted on Acquia Cloud, and Acquia led a lot of the architecture, development and coordination. I remember pitching the project in the basement of Boston's City Hall, so seeing the site launched less than a year later is quite exciting.

The project was a big undertaking as the old website was 10 years old and running on Tridion. The city's digital team, Acquia, IDEO, Genuine Interactive, and others all worked together to reimagine how a government can serve its citizens better digitally. It was an ambitious project as the whole website was redesigned from scratch in 11 months; from creating a new identity, to interviewing citizens, to building, testing and launching the new site.

Along the way, the project relied heavily on feedback from a wide variety of residents. The openness and transparency of the whole process was refreshing. Even today, the city made its roadmap public at http://roadmap.boston.gov and is actively encouraging citizens to submit suggestions. This open process is one of the many reasons why I think Drupal is such a good fit for Boston.gov.

Boston gov tell us what you think

More than 20,000 web pages and one million words were rewritten in a more human tone to make the site easier to understand and navigate. For example, rather than organize information primarily by department (as is often the case with government websites), the new site is designed around how residents think about an issue, such as moving, starting a business or owning a car. Content is authored, maintained, and updated by more than 20 content authors across 120 city departments and initiatives.

Boston gov tools and apps

The new Boston.gov is absolutely beautiful, welcoming and usable. And, like any great technology endeavor, it will never stop improving. The City of Boston has only just begun its journey with Boston.gov - I’m excited see how it grows and evolves in the years to come. Go Boston!

Boston gov launch event Boston gov launch event Boston gov launch event Last night there was a launch party to celebrate the launch of Boston.gov. It was an honor to give some remarks about this project alongside Boston Mayor Marty Walsh (pictured above), as well as Lauren Lockwood (Chief Digital Officer of the City of Boston) and Jascha Franklin-Hodge (Chief Information Officer of the City of Boston).

Think First, Then Design

Posted by Mediacurrent on July 21, 2016 at 3:01pm
User Experience Matters

There are many talented designers with the ability to create a fabulous, responsive, web design worthy of the term “screen candy.” But looks aren’t everything and website design is not just art. When a website fails to engage the visitor, it’s often due to the designer’s failure to plan strategically.

Why Is Learning Drupal Hard?

Posted by Drupalize.Me on July 21, 2016 at 1:00pm

When it comes to learning Drupal I have a theory that there's an inverse relationship between the scope of knowledge that you need to understand during each phase of the learning process, and the density of available resources that can teach it to you. Accepting this, and understanding how to get through the dip, is an important part of learning Drupal.

The Power of Extending Twig Templates

Posted by FFW Agency on July 21, 2016 at 7:06am
The Power of Extending Twig Templates David Hernandez Thu, 07/21/2016 - 07:06

Extending in Twig is a method by which one template can inherit content from another template, while still being able to override parts of that content. This relationship is easy to imagine if you are familiar with Drupal’s default system of template inheritance.

A theme can have multiple page templates, many node templates, even more field templates, and a plethora of block and Views template. And it is common for those templates to largely be identical, save for a snippet of markup or some logic. The advantage in extending templates is reducing this duplication, thereby simplifying architecture and easing maintenance.

Let’s say, for example, you want to change the template for a specific block, adding a wrapper div around the main content area. This might be done by copying the standard block template and giving it a name specific to your block.

Classy’s block.html.twig template
{%
  set classes = [
    'block',
    'block-' ~ configuration.provider|clean_class,
    'block-' ~ plugin_id|clean_class,
  ]
%}
<div{{ attributes.addClass(classes) }}>
  {{ title_prefix }}
  {% if label %}
    <h2{{ title_attributes }}>{{ label }}</h2>
  {% endif %}
  {{ title_suffix }}
  {% block content %}
    {{ content }}
  {% endblock %}
</div>

Copied to block--my-special-block.html.twig
{%
  set classes = [
    'block',
    'block-' ~ configuration.provider|clean_class,
    'block-' ~ plugin_id|clean_class,
  ]
%}
<div{{ attributes.addClass(classes) }}>
  {{ title_prefix }}
  {% if label %}
    <h2{{ title_attributes }}>{{ label }}</h2>
  {% endif %}
  {{ title_suffix }}
  {% block content %}
    <div class=”content-wrapper”>{{ content }}</div>
  {% endblock %}
</div>

This accomplishes your goal. You have a template specific to this particular block, and a wrapper div just where you need it. Following the same method, and with a complex site, you can end up with lots of different block templates (or node templates, or field templates, or … you get the idea.)

But, now you have a different problem. The majority of the template is duplicated. All the CSS classes, the outer wrapper, the markup for the block title, etc. If any of that needs to be changed, like changing all block titles from H2s to H3s, you have to update every single one of those templates.

Even if this happens infrequently enough not to be considered time consuming, it is still prone to errors. You might make a mistake in one template, miss one that needs changing, or even change one that should not be changed.

This is where {% extends %} comes in

Extending templates allows you to reference the original template, and only override the parts that are unique to the child template.

In the block example, we can create a block--my-special-block.html.twig template with this content:

{% extends "block.html.twig" %}
{% block content %}
  <div class=”content-wrapper”>{{ parent() }}</div>
{% endblock %}

That’s it. That is the whole template. Twig uses the original block.html.twig template as the main template, and only uses what we override in the more specific block--my-special-block.html.twig template.

The parent() function simply returns all of the content within the {% block %} tags in the original template. This saves us from having to duplicate that content; keeping the template simple, and future proofing it. If any of that content changes in the original template, we don’t have to update the block--my-special-block.html.twig template.

In this example, the content in the original template is fairly simple, only printing the content variable, but imagine if there was a large amount of multiline html and Twig code wrapped in those block tags.

Twig blocks, not Drupal blocks!

This overriding is done by using Twig blocks. (Terminology is fun!) The Twig block is what you see identified by the {% block %} and {% endblock %} tags. The word "content" is the identifier for the block. You can have multiple blocks in a single template.

In the block--my-special-block.html.twig template file, we can do anything we want inside the block tags. Twig will replace the original templates “block” with the one in block--my-special-block.html.twig.

What else?

Well, you have access to pretty much everything in the main template, except the printed markup. So, for example, you can modify the variables it uses.

{% extends "block.html.twig" %}
{% set attributes = attributes.addClass(‘super-special’) %}

This template will add a CSS class called "super-special" to the attributes printed in the outer wrapper of the original block template. The alternative would be to copy the content of the entire block.html.twig template just to add this class to the ‘classes’ array at the top of the file.

You can also just set a variable that will be used by the original template.

{% extends "block.html.twig" %}
{% set foo = 'yellow' %}

Imagine a series of variant field or content type templates that set variables used by the original template for classes, determining structure, etc.

You can even add Twig logic.

{% extends "block.html.twig" %}
{% block content %}
  {% if foo %}
    <div class=”content-wrapper”>{{ parent() }}</div>
  {% else %}
    {{ parent() }}
  {% endif %}
{% endblock %}

Pretty much anything you still might want to do with Twig, inside or outside of the block tags, you can still do.

Things to note

Before you jump right in, and bang your head against a wall trying to figure out why something isn’t working, there a few things to know.

  • The {% extends %} line needs to be at the top of the file.
  • When overriding markup, you can only change what is within block tags in the original template. So add {% block %} tags around anything you might want to modify.
  • You cannot print additional things outside of the overriding block tags. You will have an extends line. You can set variables, add comments, add logic, and override blocks. You cannot put other pieces of markup in the template. Only markup that is inside a block.
  • If Drupal does not extend the correct template, based on what you expect from template inheritance, you may have to explicitly state the template you want.
    Example: {% extends "@classy/block/block.html.twig" %}

Additional Resources

Blades of grass Tagged with Comments

[GSoC 2016: Social API] Week 8: Social Post implementer

Posted by GVSO Blog on July 20, 2016 at 8:36pm
[GSoC 2016: Social API] Week 8: Social Post implementer

Week 8 is over and we are just one month away from Google Summer of Code final evaluation. I mentioned in my last weekly summary that I would work on documentation about implementing a Social Auth integration.

gvso Wed, 07/20/2016 - 16:36 Tags Drupal Drupal Planet GSoC 2016

Drupal GovCon: Day 1 Recap

Posted by Third & Grove on July 20, 2016 at 6:03pm
Drupal GovCon: Day 1 Recap abby Wed, 07/20/2016 - 14:03

GSoC’ 16: Port Search Configuration module; coding week #8

Posted by Into my Galaxy on July 20, 2016 at 5:50pm

I have been porting Search Configuration module from Drupal 7 to 8 as part of this year’ s Google Summer of Code (GSoC). This summer program is an opportunity for university students to work on projects connected with open source organisation. I have been really lucky to be a part of this initiative. I could explore deep of more technologies, version control systems as part of my project in Drupal. This gives young students a platform where they are assigned mentors who are experts and experienced in various software.

Last week, I could learn some of the Drupal concepts as part of this module port. So, let me begin with the Drupal 7 property. The t function translates a string to the current language or to a given language. This makes the strings used in Drupal translatable. This generally takes up the format:

t($string, array $args = array(), array $options = array());

Here, $string is the string containing the English text to get translated.

$args: An associative array of replacements to make after translation.

$options: An optional associative array of additional options, with the following elements: lang code and context.

This t function has got some alteration in the Drupal 8. It has been replaced by the $this->t() by making use of \Drupal\Core\StringTranslation\StringTranslationTrait. 

 The translatable markup returns a string as a result of this process.

Another important aspect which I dealt was the roles. This is an important feature  for any module as it  deals with the security constraints of the module. Roles are often manipulated to grant certain permissions. What we have to do is that, initially, load the particular role to be manipulated and then provide the permission which is to be granted.

$role = Role::load('access page.');
$role->grantPermission('access comments');
$role->save();

These role functions help us to load the roles and manipulate the permissions assigned to it quite easily. Thus, turns out to be really helpful in dealing with permissions.

I have been also dealing with writing the simple test for my module. In one of my previous blog posts, I have introduced the PHP unit testing.  The simple test tests the web oriented functionality of the module. It needs a good understanding of the behaviour of the module to write an effective test. Tests are often really important to identify the flaws of a functionality and to correct it accordingly. I will be writing the simple tests for my module in the coming days. I will be sharing you the concept of this mode of testing in my next blog post.

Stay tuned for further developments on this blog post.

 

 

 


Drupal 8.2.0 will be released October 5; beta begins week of August 3

Posted by Drupal core announcements on July 20, 2016 at 4:23pm

Drupal 8.2.0, the next planned minor release of Drupal 8, is scheduled for Wednesday, October 5, 2016. Minor releases include new features, usability improvements, and backwards-compatible API improvements. Here's what this means for core patches.

Drupal 8.2.0-beta1 will be released the week of August 3

  • In preparation for the minor release, Drupal 8.2.x will enter a beta phase the week of August 3.
  • Developers and site owners can begin testing the beta.
  • The 8.3.x branch of core will be created, and future feature and API additions will be targeted against that branch instead of 8.2.x.
  • All outstanding issues filed against 8.2.x will be automatically migrated to 8.3.x once it is opened.
  • During the beta phase, core issues will be committed according to the following policy:
    1. Most issues that are allowed for patch releases will be committed to all supported minor branches (8.1.x, 8.2.x, and 8.3.x) for the duration of the beta. Drupal 8.0.x is not supported anymore and changes are not made to that branch.
    2. Issues specific to added 8.2.x functionality, or disruptive changes that have a positive impact outweighing their disruption, will be committed to both 8.2.x and 8.3.x. (Such issues can be moved back to the 8.2.x branch after the automatic migration.)
    3. Most issues that are only allowed in minor releases will be committed to 8.3.x only.

Drupal 8.2.0-rc1 will be released September 7

  • The release candidate phase for the minor release begins on September 7, and starting on that date, the 8.2.x branch will be subject to release candidate restrictions, with only critical fixes and certain other limited changes allowed.
  • September 7 is also the final scheduled patch release window for 8.1.x, and it will not receive further development or support after that date aside from its final security release window on September 21.
  • All outstanding issues filed against 8.1.x will be automatically migrated to 8.2.x after the final 8.1.x patch release. Bug reports after September 7 should be targeted against the 8.2.x branch.
  • Minor versions may include changes to user interfaces, translatable strings, themes, internal APIs like render arrays and controllers, etc. (See the Drupal 8 backwards compatibility and internal API policy for details.) Developers and site owners should test the release candidate to prepare for these changes.
  • 8.3.x will remain open for new development during the 8.2.x release candidate phase.

See the Drupal core release cycle overview, Allowed changes during the Drupal 8 release cycle, and Drupal 8 backwards compatibility and internal API policy for more information.

As a reminder, we have until the start of the beta to add great new features to Drupal 8.2.x. Stabilizing experimental modules (such as Migrate and BigPipe), new features for workflows, and usability and bugfixes are all priorities for 8.2.0. Help with these feature requests and initiatives now for a great Drupal 8.2.0!

Drupal 8 Routing Tricks for Better Admin URLs

Posted by ThinkShout on July 20, 2016 at 2:30pm

We recently launched a new case tracker for foster ed youth designed to improve their educational outcomes in partnership with The National Center for Youth Law (NCYL). The web application replaces their existing platform, Goal Book, which lacked the flexibility they needed to meet their requirements. A web application differs from a website in that a website primarily provides content where a web application primarily provides tools.

The project presented us with an opportunity to do extensive custom development with our favorite new platform, Drupal 8. D8’s many developer experience improvements, including standardized object-oriented development methods, allowed us to meet NCYL’s requirements efficiently and with a level of quality that would have been more difficult on Drupal 7. In addition, we were able to accelerate the release of RedHen CRM on Drupal 8, which lives at the heart of the application managing all of the contacts, organizations, and relationships.

To enhance the utility of the application, we made an early decision to customize every URL a user would interact with. As most of the functionality would revolve around nodes, we wanted to make sure we avoided URLs like /node/256/edit that don’t give the user any indication of which part of the application they’re using.

Implementation

If you wanted to customize URLs in Drupal 7, you could use the Pathauto module. You can still do that in Drupal 8, but D8’s routing system can be coaxed into doing something similar. It works on admin pages, too, which was perfect for NCYL’s needs.

Overriding Existing Node Paths

As an example, let’s say you have a node type specifically for storing information about schools: a School Node. The standard admin path for adding a School Node would be something like this:

/node/add/school

But, add a custom module with route configuration and you can have this:

/school/add

For simplicity, we’ll call our module school.module. The directory structure looks like this:

modules/
  school/
    school.module
    school.routing.yml

The route configuration sits inside school.routing.yml and looks like this:

school.add:
  path: '/school/add'
  defaults:
    _controller: '\Drupal\node\Controller\NodeController::add'
    _title: 'Add School'
    node_type: 'school'
  requirements:
    _node_add_access: 'node:school'

Line by line:

school.add:

This is the name of the route. Route names should be unique and usually start with the name of your module.

path: '/school/add'

The path the route points to. This is the part that comes after your site’s base URL.

_controller: '\Drupal\node\Controller\NodeController::add'

This tells the route to use the NodeController, provided by the Node module. No need for a custom controller here.

_title: 'Add School'

This sets the page title of the node add form.

_node_add_access: 'node:school'

This is an access handler that ensures the user has permission to add a node of type “school.”

Providing a custom path to edit School Nodes is even easier:

school.edit:
  path: '/school/{node}/edit'
  defaults:
    _entity_form: 'node.edit'
  requirements:
    node: \d+
    _entity_access: 'node.update'

We no longer need to tell the route which controller to use or what type of node we’re using. Drupal 8’s Entity API figures it out using the node ID passed in the URL.

Line by line again:

path: '/school/{node}/edit'

The path now contains a placeholder, {node}, which represents the node ID in the URL.

_entity_form: 'node.edit'

The form we want to use to edit the node.

node: \d+

Some validation to ensure the URL contains the right data type for a node ID. By specifying the regular expression pattern \d+, we are telling Drupal to only use this route when {node} is one or more digits. The route will match a URL like /school/32/edit, but will not match /school/lincoln-high/edit.

_entity_access: 'node.update'

An access handler, ensuring the user has permission to update this node. No need to specify the node type, as we did when adding a node.

Finally, a route for viewing the node:

school.view:
  path: '/school/{node}'
  defaults:
    _controller: '\Drupal\node\Controller\NodeViewController::view'
  requirements:
    node: \d+
    _entity_access: 'node.view'

Very similar to the node edit route, just with a different path and controller.

For a more thorough explanation of routes and route options not covered here, check out the official docs.

Custom Controllers

What if you want to provide a custom controller for adding a node and still take advantage of Drupal’s permissions system? Routes can do that, too.

Let’s introduce a Teacher Node and an accompanying module.

modules/
  school/
  teacher/
    src/
      Controller/
        TeacherController.php
    teacher.module
    teacher.routing.yml

teacher.routing.yml looks like this:

teacher.add:
  path: '/teacher/add'
  defaults:
    _controller: '\Drupal\teacher\Controller\TeacherController::addTeacher'
    _title: 'Add Teacher'
    node_type: 'teacher'
  requirements:
    _node_add_access: 'node:teacher'

Very similar to the route we used to add School Nodes, but with a custom controller.

TeacherController.php looks like this:

<?php
namespace Drupal\teacher\Controller;

use Drupal\node\NodeTypeInterface;

class TeacherController extends ControllerBase {

  public function addTeacher(NodeTypeInterface $node_type) {

  }

}

The addTeacher function is where you would add your custom code for adding Teacher Nodes.

That’s how you can use core Drupal 8 functionality to make your Drupal admin pages a little more user friendly.

Pages

Subscribe with RSS Subscribe to Drupal.org aggregator - Planet Drupal