X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Fmkws-manual.markdown;h=2060dda2fc807abb3bb068052d48448438e100b9;hb=f6ab13587b58fba947e4257e7ff1091bbaffcb64;hp=8f3cf4203ed4d5b57fd039a89c070524d46ad27a;hpb=8fa5512e774eb4ef259b146791458598f3777f08;p=mkws-moved-to-github.git diff --git a/doc/mkws-manual.markdown b/doc/mkws-manual.markdown index 8f3cf42..2060dda 100644 --- a/doc/mkws-manual.markdown +++ b/doc/mkws-manual.markdown @@ -65,8 +65,10 @@ The following is -
-
+
+ +
+
@@ -212,7 +214,7 @@ the system. For details of Handlebars template syntax, see [the online documentation](http://handlebarsjs.com/). The templates used by the core widgets can be viewed in [our git -repository](http://git.indexdata.com/?p=mkws.git;a=tree;f=src/mkws.templates;). +repository](http://git.indexdata.com/?p=mkws.git;a=tree;f=src/templates;). Parameters are documented in a comment at the top of each template so you can see what's going where. If all you want to do is add a CSS class to something or change a `span` to a `div` it's easy to just copy the existing @@ -222,24 +224,24 @@ Overriding templates -------------------- To override the template for a widget, include it inline in the document -as a ` The Facet template has a special feature where you can override it on a per-facet basis by adding a dash and the facet name as a suffix eg. -`Facet-Subjects` rather than `Facet`. (So `class="mkwsTemplate_Facet-Subjects"`) +`facet-subjects` rather than `facet`. (So `class="mkws-template-facet-subjects"`) You can also explicitly specify a different template for a particular instance of a widget by providing the name of your alternative (eg. SpecialPager) as the value of the `template` key in the MKWS config object for that widget: -for example, `
`. +for example, `
`. Templates for MKWS can also be [precompiled](http://handlebarsjs.com/precompilation.html). If a precompiled @@ -278,7 +280,7 @@ Rather than use the included AJAX helpers to render record details inline, here's a Records template that will link directly to the source via the address provided in the metadata as the first element of `md-electronic-url`: -