Hi Ed,

All of that seems correct, yes. I don't know what that has to do with the
"field" tag, though - every form definition needs "field" tags, or else it
won't display any fields.

If you want to display multiple-instance templates in a nice way on the
page, the best way to do that is usually to embed all those instances
within another template - that way you can control the wikitext that comes
both before and after those calls. There's a brief explanation of embedding
at the end of this section:

https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms#Multiple-instance_templates

-Yaron

On Sun, Nov 22, 2015 at 10:20 AM, Ed <[email protected]> wrote:

> Hi everyone,
>
> Yaron, the "[[Person:{{{Author|}}}|{{{Author|}}}]]" worked like a charm.
> Thank you so much!
>
> I'm trying to understand how it all works together and so far this is what
> I gathered.
>
>    - Forms glue a number of templates together
>    - Each template defines its own data structure in cargo
>    - When a form is saved it saves "hard coded" template calls on the
>    "subject" page and the db data in the respective cargo tables -- one
> cargo
>    table (or set of tables) per template.
>    - The order and format in which this gets written in the "subject" page
>    is defined in the form
>
> If the above is correct the basic building block in this model is a
> template, and if we want to be particular in how data is presented that
> will dictate the templates and the templates will dictate the cargo tables.
>
> For example, if in the authors table we want section A to be the author
> birth and death dates as an info box, section B to be the free text of that
> page, section C to be the list of literary awards to this author (including
> date and work related to each award), and section D links to Wikipedia for
> that person... then we need to create a minimum of 3 templates
> corresponding to sections A, C (multi) and D.  With each of them having
> their own tables in cargo.
>
> *Question* 1:  Is the above correct?   Are there some examples of the use
> of the *field *tag when using the cargo extension -- all fields seem to be
> already rendered in the template that defines the cargo structures, so I'm
> not sure when we would use the *field *tag.
> *Question* 2:  What is the best way to take control of the rendering of a
> multi instance template, like the list of awards, in the "Read" version of
> a page?
>
>    - Example 1: Defining the HTML that precedes all rows "<table>", is
>    rendered with each row "<tr>"..."</tr>", and wraps the series
> "</table>".
>
>
>    - Example 2: Adding a label preceding the all rows "<hr />'''Awards:'''"
>
>
> Thanks!
> - Ed
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to