Wml-template
提供:Dev Guides
WML-テンプレート
<template>は、デッキ内のすべてのカードに<do>および<onevent>要素を適用するために使用されます。 この要素は、デッキ内のすべてのカードのテンプレートを定義し、<template>タグ内のコードがデッキ内の各カードに追加されます。
WMLカードで同じ_name_属性値を持つ別の<do>要素を定義することにより、テンプレートの<do>要素をオーバーライドできます。
<template>要素は、次の属性をサポートしています。
Attribute | Value | Description |
---|---|---|
onenterbackward | URL | Occurs when the user navigates into a card using a "prev" task |
onenterforward | URL | Occurs when the user navigates into a card using a "go" task |
ontimer | URL | Occurs when the "timer" expires |
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
以下は、<go>要素の使用法を示す例です。
これにより、次のメニューが生成され、すべての章をナビゲートできるようになります。