我include在Drupal中创建了一个:
{% include directory ~ '/partials/header.html.twig' %}
但我收到此错误:
Twig_Error_Loader: Template "themes/custom/mytheme/partials/header.html.twig" is not defined (Drupal\Core\Template\Loader\ThemeRegistryLoader: Unable to find template "themes/custom/mytheme/partials/header.html.twig" in the Drupal theme registry.) in "themes/custom/mytheme/page--front.html.twig" at line 1. in Twig_Loader_Chain->getCacheKey() (line 115 of vendor/twig/twig/lib/Twig/Loader/Chain.php).
根据Drupal和Twig文档,我正在以正确的方式进行操作。
我有一个目录partials,一个文件header.html.twig。
我究竟做错了什么?我在El Capitan的MAMP和OSX中运行Drupal。Drupal 8.3.7
我想让 gulp 吐出一个style.min.css:
// Minify
gulp.task('minify-css', function () {
gulp.src('css/style.css')
.pipe(cleanCSS())
.pipe(gulp.dest('css/style.min.css'))
});
Run Code Online (Sandbox Code Playgroud)
它正在缩小,.css而是创建一个包含 style.css 的目录:
css/style.min.css/style.css
Run Code Online (Sandbox Code Playgroud)
有什么帮助吗?谢谢。
我在模态中有一个iframe,但是当我打开模型时,iframe中的iframe没有显示页面的开头而是中间.
<iframe name="finance" id="finance" src="https://www.elbtools.com/secure/apply.php?elbt=1459262273170" frameborder="0" border="0" cellspacing="0" style="width:100%; height: 700px;"></iframe>
这是我的codepen.谢谢.
首先我跑了:rails generate model User name:string email:string这会创建一个迁移。后来我做了一个db:migrate,我得到这个错误:
bundle exec rake db:migrate
== 20150728195629 CreateUsers: migrating ======================================
-- create_table(:users)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: table "users" already exists.....
Run Code Online (Sandbox Code Playgroud)
当您创建generate model表user时,但是当您rake db:migrate尝试再次创建它时。
我糊涂了!难道我做错了什么?
https://www.railstutorial.org/book/modeling_users#code-generate_user_model