Date post: | 07-Aug-2015 |
Category: |
Internet |
Upload: | drupaltour |
View: | 51 times |
Download: | 1 times |
План
● What is Drupal?● Who uses Drupal?● For end-users & clients● For site builders● Multilang● For designers and themers● For developers● Summary
Views = fully customizable...
With the Drupal 8 views, you can customize:● Admin listings ● Sidebar content ● Image galleries ● Slideshows ● REST output
...with 0 lines of code!
Twig Example: node.html.twig<article{{ attributes }}> {{ title_prefix }} {% if not page %} <h2{{ title_attributes }}> <a href="{{ url }}" rel="bookmark">{{ label }}</a> </h2> {% endif %} {{ title_suffix }} {% if display_submitted %} <footer class="node__meta"> {{ author_picture }} <div class="node__submitted {{ author_attributes.class }}"{{ author_attributes|without('class') }}> {% trans %}Submitted by {{ author_name|passthrough }} on {{ date }}{% endtrans %} {{ metadata }} </div> </footer> {% endif %} <div class="node__content {{ content_attributes.class }}"{{ content_attributes|without('class') }}> {{ content|without('links') }} </div> {% if content.links %} <div class="node__links"> {{ content.links }} </div> {% endif %}</article>
node.tpl.php<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> <?php print $user_picture; ?> <?php print render($title_prefix); ?> <?php if (!$page): ?> <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2> <?php endif; ?> <?php print render($title_suffix); ?> <?php if ($display_submitted): ?> <div class="submitted"> <?php print $submitted; ?> </div> <?php endif; ?> <div class="content"<?php print $content_attributes; ?>> <?php hide($content['comments']); hide($content['links']); print render($content); ?> </div> <?php print render($content['links']); ?> <?php print render($content['comments']); ?></div>
Web services
other systems or frameworks
desktop
Android applications
other Drupal sites
Flash components
iPhone applications
kiosk applications
● HttpFoundation ● HttpKernel● Dependency ● Injection ● EventDispatcher ● Routing ● Yaml
Symfony framework
GETting data into Drupal: Guzzle
$client = \Drupal::httpClient();$config = \Drupal::config('3rdparty.settings');
// Format arguments for passing in URL.$arg = urlencode($argument);
// Pull data from 3rd party's REST API.$api_key = $config->get('api_key');$request = $client->get("http://3rdparty.com/$arg/?key=$api_key");
// Get the response and do something with it.$response = $request->send();$json = $response->json();
...
https://drupal.org/contribute
Where do we need help?
● Finding and fixing bugs ● Performance ● Migration path ● Port contributed projects● DOCUMENTATION! ● EXAMPLES! ● TOOLS! ● TESTING, TESTING, TESTING!
My own modules?
● Use https://www.drupal.org/project/drupalmoduleupgrader to start the upgrade of your code.
● If you need to / want to start your module fresh, see https://www.drupal.org/project/console