Im sorry, i wrote my semantic form code wrong, it is like this:
And the code of my semantic form is this:
Este es el formulario '' MyForm ''.
Para crear una página con este formulario, ingrese el nombre de la página a
continuación; si la página con ese nombre ya existe, será dirigido al
formulario para editar esa página.
{{#forminput:form=MyForm}}
==Relations==
{{{for template|Relations}}}
{{{field|Relation|holds template}}}
{{{end template}}}
{{{for template|Relation|multiple|embed in field=Relations[Relation]}}}
{| class="formtable"
! Kind:
| {{{field|Kind}}}
|-
! Identifier:
| {{{field|Identifier}}}
|-
! Description:
| {{{field|Description}}}
|}
{{{end template}}}
Hope someone can help me. I cant make it work.
Regards,
Marcelo.
2012/6/30 Marcelo Chiaradía
> Hi Yaron,
>
> I've been looking at the page you pointed me.
>
> Im having some difficulties to do it. Maybe it is something worng in my
> code.
> I have a main template call "Relations", which must have inside of him
> several instances of another template called " Relation".
>
> The code of "Relation" is this:
>
>
> Este es la plantilla 'Relation'. Debe ser llamada en el siguiente formato:
>
> {{Relation
> |Kind=
> |Identifier=
> |Description=
> }}
>
> Editar la página para ver el texto de la plantilla.
>
>
> {| style="width: 30em; font-size: 90%; border: 1px solid #aa;
> background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left:
> 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
> ! style="text-align: center; background-color:#ff;" colspan="2"
> |Relation
> |-
> ! Kind
> |{{{Kind}}}
> |-
> ! Identifier
> |[[{{{Identifier}}}]]
> |-
> ! Description
> |{{{Description}}}
> |}
> {{#set_internal:hasCategory
> |Lom Relation kind={{{Kind|}}}
> |Lom Relation identifier={{{Identifier|}}}
> |Lom Relation description={{{Description|}}}
> }}
>
>
> The code of "Relations" is this:
>
>
> Este es la plantilla 'Relations'. Debe ser llamada en el siguiente formato:
>
> {{Relations
> |Resource=={{Relation
> |Kind
> |Identifier
> |Description
> }}
> }}
>
> Editar la página para ver el texto de la plantilla.
>
> {| style="width: 30em; font-size: 90%; border: 1px solid #aa;
> background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left:
> 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
> ! style="text-align: center; background-color:#ff;" colspan="2"
> |Relations
> |-
> ! Relation
> | [[HasRelation::{{{Relation|}}}]]
> |}
>
>
> And the code of my semantic form is this:
>
>
> Este es el formulario '' MyForm ''.
> Para crear una página con este formulario, ingrese el nombre de la página
> a continuación; si la página con ese nombre ya existe, será dirigido al
> formulario para editar esa página.
>
>
> {{#forminput:form=MyForm}}
>
>
>
>
> ==Relations==
>
> {{{for template|Relaciones}}}
> {{{field|Resource|holds template}}}
> {{{end template}}}
>
> {{{for template|Relation|multiple|embed in field=Relaciones[Resource]}}}
>
> {| class="formtable"
> ! Kind:
> | {{{field|Kind}}}
> |-
> ! Identifier:
> | {{{field|Identifier}}}
> |-
> ! Description:
> | {{{field|Description}}}
> |}
>
> {{{end template}}}
>
> '''Texto libre:'''
>
> {{{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}}}
>
>
> Can you give me hand and tell me what am i doing wrong?
>
> Thanks in advance,
>
> Marcelo.
>
> 2012/6/29 Yaron Koren
>
>> Hi,
>>
>> Yes, you can do that via the "embed in field" and "holds template"
>> parameters - see here:
>>
>>
>> http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms#Form_markup_language
>>
>>
>> -Yaron
>>
>>
>> On Fri, Jun 29, 2012 at 3:55 PM, Marcelo Chiaradía <
>> chiaradiamarc...@gmail.com> wrote:
>>
>>> Hi Yaron,
>>>
>>> Ok, I'll give it a try, thanks a lot.
>>>
>>> One other question, does the semantic forms extension support nested
>>> templates?
>>>
>>> For example, I have a template A, which must have several instances of a
>>> template B. I would like to complete the data for A, and create several
>>> instances of B within A, using only one semantic form.
>>>
>>> Is that possible? If so, can you point me to an example of how to do it?
>>>
>>> Thanks in advance,
>>>
>>> Marcelo.
>>>
>>>
>>> 2012/6/29 Yaron Koren
>>>
Hi Marcelo,
If I understand your question correctly - I would strongly recommend
using the Semantic Internal Objects extension to store the data in that
multiple-instance template, instead of just regular SMW property tags:
http://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects
That will allow you to associate each set of data with its instance.
-Yaron
On Thu, Jun 28, 2012 at 9:48 PM, Marcelo Chiaradía <
chiaradiamarc...@gmail.com> wrote:
> Hel