This lesson will cover the following topics:

01 Getting Started

In this tutorial, we explore custom modals in Titan Web. Custom modals are great to use when you need to heavily customize your web page. A custom modal could be any page within Titan or any external page either from another Titan application or a completely external site.

02 How to Open a Modal From an Action

This tutorial aims to show a modal whenever a button is clicked. We will use a full template page as our modal.

1. Click on the Pages tab and then Add New Page.

Screenshot of the expanded Pages dropdown showing how to add a new page

2. Select a page from the Templates list and then click the Add to Project button.

Add a New Page window

3. Navigate back to your Home page and add a Button.

Screenshot of the element menu displaying how to insert a button

4. Click on the Interactivity settings and then set up an action for your button.

Screenshot of the button menu with the interactivity icon highlighted

5. Click on the + icon and select Redirect/ Go to Page as an action.

Screenshot of On Click Action window with Add Node screen overlayed

6. Choose whether you would like your button to navigate to an external or internal site.

7. Select the Redirect URL and choose the web page you want to go to. Open in is where we choose to open this page as a modal.

8. Configure your parameter settings.

Screenshot of Add Node Redirect Internal configuration

Save your project and preview your button’s actions. When you click on your button, it should take you to your new page.

03 How to Close a Modal From an Action

This tutorial aims to close a modal whenever a button is clicked. We will use a full template page as our modal.

1. Select an element from your template. For this demo, we have chosen the Read More button.

2. Click on the interactivity settings to set up an action.

Screenshot displaying the button menu with the configure on click action link icon highlighted

3. Choose Page Actions.

Screenshot of On Click Action window with Add Node screen overlayed

4. Select the Close Modal option in the side menu. Make sure to mark the Enable and Enable Set Parent Parameters checkboxes when passing the parameters before clicking on Next to complete the setup.

Screenshot of add node page actions window showing close modal config

5. Save and preview your project.

The Read More button should now close the template page when you click it.

04 Got Feedback?

Additional Resources