> For the complete documentation index, see [llms.txt](https://docs.silkbuilder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.silkbuilder.com/tags/module.md). Agents can also search and read this documentation through its [MCP server](https://docs.silkbuilder.com/~gitbook/mcp).

# Module

The component **silk:Module** is used to organize the code in different files. An application will later reference these files. Multiple applications could use a module. The module can hold other component tags.

In the SilkBuilder IDE, a module file that is only serving one application, and not others, does not require the **silk:Module** tag. In this case, the file will be called directly using the `<%@include file="module_file"%>` JSP tag.

Refer to the documentation for a detailed explanation on how to use modules.

## Tag Definition

Used as a container:

```xml
<silk:Module
  renderIf=""
>
   Contains: SilkBuilder components and HTML.
</silk:Module>
```

The module hold SilkBuilder components and HTML.

```xml
<%@ taglib uri="/WEB-INF/silk.tld" prefix="silk" %>
<%@page contentType="text/html;charset=UTF-8"%>
<silk:Module >

    ... silk:Page component

    ... silk:DataProvider components

  <silk:JScode>
    ... Java Script code here
  </silk:JScode>

  <silk:JQcode>
    ... JQuery code here
  </silk:JQcode>

</silk:Module >
```

The parent application will use the `<jsp:include>` tag to reference the module. This call may also include parameters. It can be combined with module files serving only one application.

```xml
<silk:App>

  <silk:Screen>
    <jsp:include page="moduleFile1.jsp" />
    <jsp:include page="index/moduleFile2.jsp" >
      <jsp:param name="id" value="15" />
      <jsp:param name="name" value="Peter" />
    </jsp:include>
    <%@include file="index/module_file3.jsp"%>
  </silk:Screen>

  <silk:JScode>
    ... Java Script code here
  </silk:JScode>

  <silk:JQcode>
    ... JQuery code here
  </silk:JQcode>

</silk:App>
```

## Properties

### renderIf

It contains the logic sentence defining whether the component should be rendered.\
The logic statement's explanation is in the [Server Code Logic](https://github.com/silkbuider/documentation/tree/master/tags/how_to/server_code_logic.md) documentation.\
Default Value: *Empty*.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.silkbuilder.com/tags/module.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
