Filtering iframes

Rachael Norris
Rachael Norris
  • Updated

In this article, we’ll walk you through how you can filter iframes to create bespoke pages.

Before starting, make sure you’re familiar with:


Why filter iframes?

There are lots of reasons why you may want to filter the items displayed within an iframe on your website.  

Here are some common examples of how you can use a filtered iframe:

  • To create a page on your website which that only shows Events which are part of a particular series or festival.
  • To create a page that only displays Merchandise items associated with a particular show or exhibition.
  • To create two Membership pages, one for corporate Memberships and one for general Memberships.
  • To create a Donations page for a specific Fund.
  • To show a limited selection of Ticket Subscriptions on a page.


How to use Attributes to filter iframes

You can use Attributes to filter Events, Donations, Merchandise and Memberships.

TIP: It is also possible to filter Ticket Subscriptions, however, this is the only item that does not use Attributes for filtering, and instead uses the Web ID.

There are three steps involved:

  1. First, you’ll need to create the custom Attributes you intend to use
  2. Then apply them to the items (Events, Merchandise or Memberships, etc.) you wish to filter. 
  3. Finally, you will need to add a string to the URL of the iframe.


Creating Custom Attributes

Start by deciding which iframe you’d like to filter. 

If you want to filter the Events iframe, you’ll need an Event Attribute. For Merchandise, you’ll need to create a Merchandise Attribute, and so on.

When using Attributes to filter iframes, you might want to use drop down Attributes to avoid any potential spelling errors preventing the filter from working correctly.

Another type of Attribute you can use is the check box.  You can see an example of this with an Event Attribute below.

Take a look at our article on Attributes for step by step guidance.


Applying the Attributes

Once you have created the Attributes in your system, you need to apply them to the items you want to filter by.

If we look at the example of creating an Events page for a festival, we would need to apply the Event Attribute to each of the Events we wish to include on the page. This can be applied in the Basic Details of an Event in the Admin Interface.

TIP: If you want to apply an Event Attribute to multiple Events at once, read our article on the Bulk Instance Updater Tool.

For Merchandise, Membership or Donations Attributes, you’ll need to apply these in the set up of each of the items.


Referencing these attributes in iframe addresses

Next, you’ll need to find the URL of the iframe you want to filter and add a string to the end of it which references your Attribute.

This can be done in three steps:

  1. Find your URL
  2. Add the iframe address
  3. Add the Attribute filter


1. Find your URL

If you are using a Custom Domain, the first part of your iframe URL will be:  

  • Replace the yourwebaddress with your website address.
  • Replace yourclientname with your client name.


If you are not using a Custom Domain, the first part of your iframe URL will be: 


2. Add the iframe address

Then select the iframe you are filtering and add that to the end of the address:

So, if we were to add the Event iframe to the URL we already have it would be:

You can test this by replacing yourclientname with your client name and following the link above. This should take you to a preview of your Event List iframe.


3. Adding the Attribute filter

Finally, on to the end of the address you have built so far, add the string:

?Attribute_Name of Attribute=Value of Attribute

  • Replace the Name of Attribute and the Value of Attribute with the name and value of the Attribute you created.
  • If your Attribute name or Value has any spaces, you’ll need to replace the spaces with the code %20.

For example:


  • If you have chosen a checkbox Attribute, the Value of the attribute is 1 for boxes that have been checked. 

So, to return to the festival Event list filter, the complete URL would be:

In this example, we’re using the Attribute “Part of the Family Festival”.

Once you have tested your link and are happy with the filtering of the iframe, you can pass this over to your web developers to embed this into your website.

Full documentation for web developers on this process can be found on our Integrate Portal.


How to use Web ID to filter Ticket Subscriptions

Unlike other Spektrix Web IDs, Ticket Subscriptions do not have to have unique Web IDs.

This means that you can use Web IDs to display multiple subscriptions together and filter out any Ticket Subscriptions that don’t have this Web ID.

To learn about how to add Web IDs to Ticket Subscriptions, follow the guidane in How to Set up Ticket Subscriptions.

Once you have applied the Web ID, you'll need to reference this in the URL of your iframe.

  • To do this, follow step one from the previous section to find your URL.
  • Add the Ticket Subscription iframe address to the end of this URL.

For example:

  • Finally, on to the end of the address you have built so far, add the string:


  • Replace YourWebID with the Web ID of the Ticket Subscriptions you wish to include.


Further Reading

To continue learning about how to configure iframes, take a look at the following articles: