> For the complete documentation index, see [llms.txt](https://contentbox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://contentbox.ortusbooks.com/back-end-development/back-end-development/widgets/multiple-render-function-widgets.md).

# Multiple Render Function Widgets

Widgets are required to provide one function called `renderIt()`, but they can actually provide more than one render option. If you add another function, then the display of the Widget Form changes.

Now you will see a `Public Methods` menu, with a list of public functions in ths CFC. Below you can see the required function `renderIt()` and the 2 additional functions. `listOfPages()` and `listOfCategories()`

![](/files/-LA-UrDbEmUDzSTMK-wC)

When you select a different Method, the options change, depending on the function. This means you could have 1 widget, with several different display options... each with their own set of arguments. Packaging them inside a single Widget CFC allows them to easily share functions.

Above, you can see the `renderIt()` function has 1 argument, with label, hint, required etc.

The `listOfPages()` function has 1 argument, a plain text field `numberOfPages`, as you can see below.&#x20;

![](/files/-LA-UrDrCcCwwo7n_Ys7)

The `listOfCategories()`function has 1 argument, a plain text field `numberOfCategories`, as you can see below.&#x20;

![](/files/-LA-UrE87wYk0XCyG-5L)

## Hiding UDF Functions

If you add a UDF to your Widget, to be able to dynamically create the select drop down for your Widget arguments, you might notice an unexpected side effect. This function / method shows up in the `Select a Method` drop down box.

![](/files/-LA-Up4afO-OnINsjVOV)

Your first thought might be, to use a private function. The Widget form builder needs to call the UDF to generate the Select Boxes, so it cannot be a private function.

The solution, add Meta data about the function... including `cbignore`. You can add this with the function meta data in a comment.

```java
/**
* @cbignore
*/
function getTargetTypes(){
    return [ '_self','_blank','_top','_parent','ThisisfromTheUDF' ];
}
```

Or you could add this meta data with the inline meta style.

```java
function getTargetTypes() cbignore{
    return [ '_self','_blank','_top','_parent','ThisisfromTheUDF' ];
}
```

With either of these two options, you will see the list of Options provided by the UDF, but you will not see the `Public Methods` option, as there is only 1 public rendering function.

![](/files/-LA-Up8BGysGaBDUNHvF)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://contentbox.ortusbooks.com/back-end-development/back-end-development/widgets/multiple-render-function-widgets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
