Difference between revisions of "Talk:WikiDB/Tutorial"

From TestWiki
Jump to: navigation, search
(Using the <nowiki><repeat></nowiki> tag to display filtered/sorted Tables)
(Templated queries)
Line 4: Line 4:
  
 
* Good idea. I have added the page [[WikiDB/Data types]], which covers the currently implemented core types.  WikiDB includes an API for adding your own data types, e.g. you could add a URL data type which only accepts valid URLs, and automatically displays them as links. --[[User:HappyDog|HappyDog]] 18:39, 1 December 2006 (GMT)
 
* Good idea. I have added the page [[WikiDB/Data types]], which covers the currently implemented core types.  WikiDB includes an API for adding your own data types, e.g. you could add a URL data type which only accepts valid URLs, and automatically displays them as links. --[[User:HappyDog|HappyDog]] 18:39, 1 December 2006 (GMT)
 +
 +
== Templated queries ==
 +
 +
I can declare data with a template, is there any way to pull data into a template?
 +
 +
Something like: <nowiki><repeat table="Companies" template="Infobox company"></repeat></nowiki>
 +
 +
It would look just like
 +
 +
<nowiki>{{Infobox company
 +
|name=Microsoft
 +
|founded=1492
 +
|revenue=$8
 +
}}</nowiki>
 +
 +
<nowiki><data table="Companies" template="Infobox company">
 +
name=Microsoft
 +
founded=1492
 +
revenue=$8
 +
</data></nowiki>

Revision as of 15:40, 10 July 2008

Data types

Could you provide a list with all data types?

  • Good idea. I have added the page WikiDB/Data types, which covers the currently implemented core types. WikiDB includes an API for adding your own data types, e.g. you could add a URL data type which only accepts valid URLs, and automatically displays them as links. --HappyDog 18:39, 1 December 2006 (GMT)

Templated queries

I can declare data with a template, is there any way to pull data into a template?

Something like: <repeat table="Companies" template="Infobox company"></repeat>

It would look just like

{{Infobox company |name=Microsoft |founded=1492 |revenue=$8 }}

<data table="Companies" template="Infobox company"> name=Microsoft founded=1492 revenue=$8 </data>