Skip to content

WD ATTR Load Tool

wdonadelli edited this page Feb 18, 2023 · 16 revisions

WD ATTR Load Tool

The reference for how the attribute works is in the following tools:

The target of the attribute is the containing element itself, and the result influences its content.

The attribute has the following arguments:

Name Type Mandatory Description
path String Yes External file path with HTML content to be loaded into the element.
method String No Request method (POST/GET), see send.
overlap Boolean No Content packaging, see load.
$ or $$ CSS No Necessary if you want to use form field values to make the request.

Using the arguments $or $$ is not very useful during page load, it is more interesting in situations of dynamic attribute definition.

For dynamic assignments, see:

<!-- Loading a simple HTML page -->
<div data-wd-load="path{myFile.html}" ></div>

<!-- Loading a file in the GET method -->
<div data-wd-load="path{myFile.php?id=1234}method{get}" ></div>

<!-- Loading a file with form data -->
<form id="myForm">
	<input type="text" name="name" value="default" />
	<input type="number" name="age" value="0" />
</form>

<div data-wd-load="path{myFile.php}method{post}$${#myForm > input}" ></div>
Clone this wiki locally