NOTE: This method of publishing is no longer being actively supported by our product team and will not receive any updates in the future. We suggest consulting the following article for more information on the latest publishing methods that we offer. Please contact email@example.com with any questions about what publishing method might work best for your website.
This article introduces and explain the concept of Wildcard, particularly useful when using the Manual Publishing feature.
Within a Slot configuration popup, in the URL field you can either enter a absolute URL, or a URL containing a special character in it, called wildcard and identifiable with the asterisk sign "*". This symbol represents zero or more characters in a string of characters (in this case the URL to publish on). It basically substitute any character contained in a given string.
Examples of wildcard general usage:
- Given the rule test* (all strings starting with test), will match with the following strings: test, testa, testabb, etc..
- Given the rule *test (all string ending with test), will match with the following strings: test, atest, bbtest, etc..
- Given the rule *test* (all strings containing, so starting and ending as well with test), will match with the following strings: test, testa, testaba, btest, btesta, abtestabb
- Given the rule test, will match only the string: test.
Example of an Absolute URL (without wildcard)
If you wish to publish an Experience on a absolute URL, you can simply use the provided URL.
The above Slot configuration contains an absolute URL pointing to the page https://creatordemo.zmags.com/responsive/users/solutions-lookbook/summer.html.This means that that will be the only matching page for that Slot and the Experience will be shown only there.
Examples of an URL containing wildcards
Let us assume to have the below Slot configuration:
The URL value is defined as this:
which will match all the HTML pages under the solutions-lookbook section, regardless of HTTP or HTTPSprotocol. Real examples of pages matching the above rule are the following ones:
The concrete approach shown above in general shows two things:
1. You can Publish to a site which has both http and https protocol. It is very easy,as if you wish to publish an Experience on both http://yourwebsite.com or https://yourwebsite.com (note the protocol difference), you can simply use the url *yourwebsite.com, which will be applied to both sites.
2. You can deploy one Experience to multiple pages. It is important to know that the CSS selector provided in the Slot configuration should contain a selector (preferably a CSS identifier such as "#banner") which is unique for the page, but identical across all the three pages. In this way, you can simply provide the following URL in order to publish an experiences to all the 3 pages, as we did above. Notice how the wildcard allows to substitute both the protocol and the last path of the URL. Our manual publishing feature will look for the specified HTML elements in each of the three pages, and if found, the Experience will be shown.
Wildcards can be used at any position of the URL. Assuming you have the following pages:
and that each page contains a unique CSS container, the following URL will match the three pages: *yourwebsite.com/*/holidays.
Finally, you may have a dynamic and specific strategy for creating pages on your website. For instance, let us assume that you define pages with identifier (an id or category), and that all pages having the same identifier should have the same lookbook, then the wildcard approach comes in help. Assuming you have the following pages:
a matching URL pattern covering all the pages, would be *cat123*.
IMPORTANT: It is critical that you ensure that the combination of CSS selector IDs and the web pages corresponding to the URL with the wildcard do not lead to the Experience being published to unintended pages.
As an example: If you have a DIV element with the ID "#my-id" and use that element on all pages on your site and your URL is defined as “yourwebsite.com/*” then the Experience will shown up on all pages on your site.