模拟实现Chicken Soup for the Soul站点。
业务需求
做前设计
| 需求 | drupal实现 |
|---|---|
| 公司简介(Wo We Are) | Basic page content type |
| television | article content type |
| project Dad | article content type |
| hidden heroes | article content type |
| online videos | article content type |
| The sip | article content type |
| Distribution | article content type |
| video | article content type |
| News | Aggregator module 不实现 |
| Dads | 自定义Dad content type |
| Team | 自定义team content type |
| RECENT PRESS | 自定义Recent Press content type |
| Social Media(icon) | Basic page content type |
| Social Media(text) | Basic page content type |
| 多级主导航 | Use blocks and menus |
| 页脚-menu | Use blocks and menus |
| 页脚-external-menu | Use blocks and Basic page |
| 页脚-版权 | Use blocks and Basic page |
| 首页slideshow | 自定义slideshow content type |
| 首页what we do | 自定义what we do content type |
| 首页calltoaction | Use blocks and Basic page |
| 公司化的主题 | Use a theme from Drupal.org |
真实的样子
| 需求 | drupal实现 |
|---|---|
| 公司简介(Wo We Are) image | image content type |
| 公司简介(Wo We Are) content | Basic page content type |
| Mission image | image content type |
| Mission content | Basic page content type |
| What We Do image | image content type |
| What We Do content | Basic page content type |
| television | video content type |
| television menu | menu |
| project Dad | video content type |
| Project Dad menu | menu |
| hidden heroes | video2 content type |
| hiddenheroes | menu |
| online videos | video content type |
| Online Videos | menu |
| The sip | video content type |
| The Sip | menu |
| Distribution image | image content type |
| Distribution content | Basic page content type |
| video | video content type |
| News | Rss Aggregator module |
| Meet the Dads | User(role=Dad) |
| RECENT PRESS | 自定义RECENT PRESS content type |
| Social Media(text) | menu |
| Social Media(icon) | menu(Simple Menu Icons) |
| 多级主导航 | menu(superfish) |
| 页脚-left-menu | menu |
| 页脚-right-menu | menu |
| 页脚-版权 | menu |
| 首页slideshow | 自定义Slide Show content type |
| 首页what we do | 自定义what we do content type |
| 首页calltoaction | Basic page content type |
| 公司化的主题 | Use a theme from Drupal.org |
练习参照站点
case study
https://cssentertainment.com/
key module
做前设计
- video
The biggest obstacles the project faced were the looming deadline, the relative instability of Drupal 8 immediately following the initial release, and the lack of contributed modules that were available to us. For example, the Media-related modules we would normally use for the online video section were not stable yet. Instead of using a media/file entity as we normally would to store an online video, we leveraged Drupal core’s new URL field to store the URL of the Rumble video, and used a field template to output an embed link. It was a simple and elegant solution to a difficult problem. - Features
Features makes it easy to bundle configuration into modules, and makes it easier to share configuration (in the form of Drupal modules) between the brand’s sites should the need arise in the future. - Swift Mailer
- Pathauto
结合Token完成url自动化 - Token
https://www.drupal.org/documentation/modules/token - Google Analytics
真实的样子
Tips and Tricks
- inspect machine name of fields
- js和css中不要利用admin用户的属性。比如:data-quickedit-entity-id
- views显示user时,注意views中的permission设置项
资源
- 多级菜单
- psd to theme
- https://www.youtube.com/watch?v=ITr9hHYPjBA
- https://www.slideshare.net/fourkitchens/from-photoshop-to-drupal-theme-drupalcon-san-francisco-2010/36-Create_a_sitemap_andwireframesHow_will
- https://www.slideshare.net/emmajane/psd-to-theme-acquia-webinar?qid=20f1b599-f214-49f6-8a67-a69c625464cf&v=&b=&from_search=1
- Contributed modules
https://www.drupal.org/docs/8/modules
完成时间
12天 平均每天4.5小时
演示地址
http://casestudy1nqxvc278py.devcloud.acquia-sites.com/