Examples—Random Tips

With a Promotion proxy, the results are random. This can make the Promotion proxy a good choice for tips and tricks, which is what we illustrate in these examples. First, we will show how you can accomplish this in search results. After that, we will demonstrate how to show random tips in related topics.

Display Dynamic, Random Tips in Search Results—Based on Search Query

Example

Desired Characteristics

  • Dynamic (i.e., uses search engine in output)

  • Displays in search results

  • Displays random content

  • Filter 1: Pulls from only certain micro content files

  • Filter 2: Uses the search query

    By basing the results on the user's search query, Flare won't display just any tips in our micro content file. Instead, it will show only tips whose micro content phrases match (at least partially) the search keywords.

Note Not all of the characteristics above are mandatory to accomplish the results you might want. They are simply the characteristics we selected for this example.

Steps

  1. Create a micro content file containing tips (see Creating Micro Content). In our example, we have created some dog training tips and saved them in a file called "Tips.flmco."

  2. Create a new custom topic to hold search results (rather than using the built-in page from Flare). In this example, we named our topic "Search-Results.htm."

  3. In that topic, remove the placeholder text and add a responsive layout.

    Note A responsive layout isn't mandatory, but it helps us get the structure we want in the output, with the regular search results on the left and the micro content on the right.

  4. In the left cell of the responsive layout, insert a Search Results proxy (Insert > Proxy > Search Results). Then, place your cursor in the right cell, and select Insert > Proxy > Promotion Proxy.

  5. In the Promotion Proxy dialog, in the first filter, select Specific micro content files and select the micro content file containing the tips (in our case, Tips.flmco). Then, in the second filter field, select Search query. Finally, make sure the Limit number of results is set to 1. We could display more tips if we wanted, but our goal is to show just one random tip whenever a user performs a search that matches (at least partially) the phrases in the micro content file. Click OK when finished.

    In our example, the responsive layout in the topic is designed to use two-thirds of the space on the left for the regular search results, and one-third of the space on the right for the micro content (i.e., tips).

    Note If you have a template page that also contains a responsive layout, you might want to create a unique template page just for the custom search results topic. That template page should have just the Topic Body proxy in it. That way, you won't experience extra empty space on the side when users see the search results page in the output.

  6. Click Save the active file. to save your work.

What Happened

The user searched the term "dog." Flare found two micro content phrases using that word, so it displayed only those responses in the search results. However, the results are random. So if you keep performing a search for "dog" (or refresh the page), it might show one of those two pieces of micro content.

micro content file

Output

Display Dynamic, Random Tips in Search Results—Using All Micro Content Phrases

Example

Desired Characteristics

  • Dynamic (i.e., uses search engine in output)

  • Displays in search results

  • Displays random content

  • Filter 1: Pulls from only certain micro content files

  • Filter 2: Uses all micro content

    By basing the results on all micro content, Flare will randomly display any tips in our micro content file, whether those phrases match the search query or not.

Note Not all of the characteristics above are mandatory to accomplish the results you might want. They are simply the characteristics we selected for this example.

Steps

This example is nearly identical to the previous one. We want to display any of the tips from our micro content file (not just those matching the search query). So in the second filter of the Promotion proxy dialog, we select All micro content.

Output

Display Dynamic, Random Tips in Topics—Based on Topic Title

Example

Desired Characteristics

  • Static (i.e., compiled at build time)

  • Displays in topic content

  • Displays random content

  • Filter 1: Pulls from only certain micro content files

  • Filter 2: Uses the topic title

    By basing the results on the topic title, Flare looks to see which tips in our micro content file match what it finds for the title in the <head> tag of the markup.

Note Not all of the characteristics above are mandatory to accomplish the results you might want. They are simply the characteristics we selected for this example.

Steps

  1. Create a micro content file containing tips (see Creating Micro Content). In our example, we have created some dog training tips and saved them in a file called "Tips.flmco." Notice that we added the text "roll over" to each one of the phrases, just for demonstration purposes in this example. This text matches the main heading for one of our topics ("Roll-Over.htm). And since Flare automatically uses the main heading text as the topic title (unless you specify otherwise in the topic properties), we have matched the topic with all four of our tips.

  2. In the template page you are using for your topics, add a responsive layout, placing the Topic Body proxy in the right cell (see Template Pages and Responsive Layouts). Then, in the left cell, place your cursor and select Insert > Proxy > Promotion Proxy.

    Note A responsive layout isn't mandatory, but it helps us get the structure we want in the output, with the topic content on the right and the micro content on the left.

  3. In the Promotion Proxy dialog, in the first filter, select Specific micro content files and select the micro content file containing the tips (in our case, Tips.flmco). Then, in the second filter field, select Topic title. Finally, make sure the Limit number of results is set to 1. We could display more tips if we wanted, but our goal is to show just one random tip whenever a user opens a topic where the title matches (at least partially) the phrases in the micro content file. Click OK when finished.

    In our example, the responsive layout in the template is designed to use one-third of the space on the left for the micro content (i.e., tips) and two-thirds of the space on the right for the regular topic content.

    Note If you open a topic in the output where the title matches the micro content phrase(s) (in our case, the "Roll-Over.htm" topic), a tip will display to the left of the content. If you open a topic in the output where a match does not exist, the topic will shift to the left, with no tip shown.

  4. Click Save the active file. to save your work.

Output