【问题标题】:Semantic Mediawiki #ask query with long result带有长结果的语义 Mediawiki #ask 查询
【发布时间】:2016-03-10 08:50:13
【问题描述】:

我使用 Semantic Mediawiki 和 Semantic Forms。

我制作了一个使用子对象的表单。因此,为了在 Mediawiki 页面上显示用户在我的表单中编写的文本 - 我使用 #ask 查询和 wiki 模板。我的询问代码是这样的:

{{#ask: [[-Has subobject::{{FULLPAGENAME}}]]
   |?MyProperty1
   |?MyProperty2
   |format=template
   |template=MyTemplateLayout
   |introtemplate=MyTemplateLayoutHeader
   |outrotemplate=MyTemplateLayoutFooter
   |named args=yes
   }}

当用户在表单中的文本很小时,它可以工作。但如果文本中有输入、项目符号或 <br> 标签 - 查询结果为空:

是否可以在我的表单中配置或隐藏长文本以产生有效的查询结果?我该怎么做?

以防万一 - 我的模板代码是:

   {{#if:{{{?MyProperty1|}}} {{{?MyProperty2|}}}|
   {{!}}- style="background-color: WhiteSmoke;"
   {{!}}{{{?MyProperty1|}}}{{!}}{{!}}{{{?MyProperty2|}}}
   {{!}}-
   }}

我的表单代码是这样的:

   {{{for template|MySubobject|multiple|add button text=Добавить|embed in field=Test[TestField]}}}
   {{{field|MyProperty1|input type=textarea|cols=90|rows=1|autogrow=true}}}||{{{field|MyProperty2|input type=textarea|cols=90|rows=1|autogrow=true}}}
   ...

【问题讨论】:

    标签: mediawiki semantics mediawiki-templates semantic-mediawiki


    【解决方案1】:

    请确保您的属性具有文本类型(创建页面Property:MyProperty 内容为[[has type::Text]])。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多