1

一直试图弄清楚如何使用表单中的值自动创建页面名称正在阅读此页面: http ://www.mediawiki.org/wiki/Extension:Semantic_Forms/Linking_to_forms#The_one-step_process

阅读后我不知道该怎么做,但我认为这是可能的,如果有人知道如何使用它,所有的帮助都会受到欢迎

嗯,这就是我所拥有的

<noinclude>
This is the "OARK" form.
To create a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit that page.

{{{info page name=<Organizational artifact relation kind[Prefix_1_2]>.
<Organizational artifact relation kind[Is target of reference law 1]>.
<Organizational artifact relation kind[Infix_2_1]>.<Organizational artifact relation kind[Is target of reference law 2]>.
<Organizational artifact relation kind[Sufix_2_1]>}}}

</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
{{{for template|Organizational artifact relation kind}}}
{| class="formtable"
! Prefix_1_2:
| {{{field|Prefix_1_2}}}
|-
! Unicity 1:
| {{{field|Unicity 1}}}
|-
! Dependency 1:
| {{{field|Dependency 1}}}
|-
! Infix_1_2:
| {{{field|Infix_1_2}}}
|-
! Sufix_1_2:
| {{{field|Sufix_1_2}}}
|-
! Prefix_2_1:
| {{{field|Prefix_2_1}}}
|-
! Unicity 2:
| {{{field|Unicity 2}}}
|-
! Dependency 2:
| {{{field|Dependency 2}}}
|-
! Infix_2_1:
| {{{field|Infix_2_1}}}
|-
! Sufix_2_1:
| {{{field|Sufix_2_1}}}
|-
! Is target of reference law 1:
| {{{field|Is target of reference law 1}}}
|-
! Is target of reference law 2:
| {{{field|Is target of reference law 2}}}
|}
{{{end template}}}

'''Free text:'''

{{{standard input|free text|rows=10}}}

{{{standard input|summary}}}

{{{standard input|minor edit}}} {{{standard input|watch}}}

{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}
</includeonly>

像往常一样它不会工作,因为我不知道如何在代码中编写它,但一般的想法是在特定字段中获取模板的值,然后创建一个具有该名称的页面,该页面具有我填写的所有值以前的。

4

1 回答 1

1

我认为您唯一的问题是info标签的格式和位置。你应该有类似的东西:

{{{info|add title=Add a match|edit title=Edit a match|page name=Game:<Match[Event]> <Match[Bracket]> <Match[Team A]> v. <Match[Team B]> <unique number>}}}

使用您的示例:

{{{info|page name=<Organizational artifact relation kind[Prefix_1_2]>.
<Organizational artifact relation kind[Is target of reference law 1]>.
<Organizational artifact relation kind[Infix_2_1]>.
<Organizational artifact relation kind[Is target of reference law 2]>.
<Organizational artifact relation kind[Sufix_2_1]>}}}

并且您需要确保它在包含的表格中,您当前在您的noinclude部分中有它。

于 2013-05-29T18:14:34.197 回答