Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为我的属性设置一个内容类型。让我们将其命名为“我的属性”。
我有一个名为“我的属性类型”的分类法,其中包含“书籍、鞋子、衣服”。
添加属性的表格在分类选定项目上发生变化,因为每个类型都有不同的字段。
在drupal中可以有这样的内容类型吗?
Drupal 中的解决方案是为每种属性类型创建单独的内容类型。但是,当分类字段被修改时,您可以轻松地编写一些 jquery 来显示/隐藏字段:
$('#your-taxonomy-dropdown').change(function() { if($(this).val() == 'book') { $('#field1').hide(); $('#field2').show(); } });