- 10 Apr 2024
- 8 minute read
- Print
- DarkLight
- PDF
Migrating from Teasers
- Updated 10 Apr 2024
- 8 minute read
- Print
- DarkLight
- PDF
This guide assists with eliminating dependence on Teasers. Depending on your circumstances, this may be as simple as deleting them from your database. It may also be necessary to create a new portal or make modifications to an existing one.
What's a Teaser?
In the past, portals were primarily configured using XML code. Back then, Teasers were a Slate feature that conditionally displayed or hid portal content. The introduction of the self-service portals tool and other improved functionality eliminated the need for Teasers.
What's happening to Teasers?
Our engineering team will be sunsetting Teasers globally across all databases in the near future. This will help us to make even greater improvements to Slate, and it will let your users do more with less prerequisite knowledge.
📧 Want a hand with Teaser migration? We've got you!We understand that your team might not have experience with Teasers, portals, XML, and content blocks, and we're happy to provide you with additional assistance to transition away from Teasers.
If you still have Teasers in your database, Technolutions staff will be in touch by email.
We will:
Let you know which member of our team is assigned to assist you
Provide hands-on help by email or video call to ease the transition process, if requested
Locating Teasers
Navigate to Database > Teasers (deprecated). This page shows a list of all the individual Teasers, organized by Type. Teasers of the same type appear in the same places in a status portal.
Active Teasers have a blank status, and inactive Teasers have an Inactive status.
![Teasers Menu](http://cdn.us.document360.io/cd8ea7a6-07f3-4846-a554-627ac016d3e3/Images/Documentation/Teasers%20Menu.png?sv=2022-11-02&spr=https&st=2024-07-08T21%3A54%3A14Z&se=2024-07-08T22%3A04%3A14Z&sr=c&sp=r&sig=GXjGsLQs1sqnjd5IO%2BmkSgZu8Z2nwgZwodNJExb%2B%2Fog%3D)
📝 NoteIf Teasers do not appear in the Database tool, this means that all of the Teasers in your database are either deleted or all Inactive, which is great!
In order to access the list to ensure they are deleted, please append this to the URL for your database:
manage/database/admin?cmd=table&id=lookup.teaser
Step 1: Determining if Teasers are still in use
Check your periods and rounds
Teasers are most commonly used in XSLT application status portals. If a custom application status portal isn't configured for a given period or round, then an XSLT portal is used instead.
To check if a custom application status portal is configured for your periods or rounds:
Navigate to Database > Application Periods.
Check your admission cycle's active or soon-to-be active periods for a custom status portal.
If:
A custom status portal has not been set for any periods, and
The Application/Status Page setting for those periods is set to Enable application and status page...
... Proceed to the next step to check your rounds.
Otherwise, your Teasers are not in use in application status portals. Proceed to check for XSLT files (below).
To check your rounds, navigate to Database > Application Rounds.
Check your rounds to see if the a custom status portal has been configured.
If:
Both the period and the round have no custom status portal set, and
The period associated with the round has the Application/Status Page setting set to Enable application and status page...
... Then this period/round combination is using an XSLT portal.
Check the XSLT file
Most XSLT portals are application status portals, but some institutions use XSLT portals outside of the application (for example, to create an Alumni Relations portal). Even if your periods/rounds are not using an XSLT portal, follow the steps below to determine if any other XSLT portals exist.
Navigate to Database > Files.
Enter 'teaser' in the search bar. Since this searches the contents of files in addition to their names, this reveals any files that may be using Teaser code.
Once the XSLT file utilizing teaser has been identified, review it and plan for its migration to a custom portal.
The following screenshot shows an example of what Teaser code looks like within an .xslt file:
Step 2: Migrating Teasers to a custom portal
Migrating from Teasers requires three contemporary Slate functions:
Custom portals
Content blocks
Conditional logic in custom portals
The following are the steps and tools needed to complete a back up and migration.
Back up current teaser configurations (optional)
It is advisable to back up teaser configurations. If you wish to preserve the contents of your Teasers for future reference, you can export them as an Excel file by running a custom SQL query. Two example queries are shown below. This is not necessary for migrating Teasers to other functionality.
The full instructions and code for creating a Custom SQL query is provided below. Alternatively, you can use Suitcase to import these Custom SQL queries into your database instead.
87c4dbfe-9390-42e9-8702-5d1dfae9525c:slate-examples
To create a custom SQL query:
Select Queries / Reports from the main navigation.
Click New Query. A popup appears.
Configure the following settings:
Name: Give this query a descriptive name.
Folder: If desired, place the query in a folder. To creat a new folder, select Other and enter a name.
Type: Local
Base: Custom SQL. You can disregard the warning message.
Click Save.
Paste one of the two custom SQL samples into the 'Custom SQL' text box in the query editor.
Export all teasers (name and HTML only)
select [name] as [Teaser Name] ,[html] as [HTML Code] from [lookup.teaser]
Export all teasers (including text description of filters)
select lt.[name] as [Teaser Name] ,[html] as [HTML Code] ,(select string_agg(convert(varchar(max), [value]), '' + char(10) + '') from (select A.value('@name', 'varchar(max)') + ' ' + A.value('.[1]/p[1]/op[1]', 'varchar(max)') + ' ' + (select string_agg(convert(varchar(max), [value]), ', ') from (select (case when try_convert(uniqueidentifier,B.value('.[1]', 'varchar(max)')) is not null then (select top 1 [value] from [lookup.prompt] lp where lp.[id] = try_convert(uniqueidentifier,B.value('.[1]', 'varchar(max)'))) else B.value('.[1]', 'varchar(max)') end) from (select null) subquery(x) cross apply A.nodes('.[1]/p[1]/v') as B1(B) ) x ([value])) from (select null) subquery(x) cross apply [query].nodes('/w') as A1(A) ) x ([value])) as [Filters] from [lookup.teaser] lt
Click Parse. The message Successfully parsed appears.
Click Save. The message Successfully saved appears.
Use the breadcrumb navigation to return to the the query's main page.
Click Run query. The query results are displayed.
At the top of the query results screen, select Excel Spreadsheet (or another desired file format) as the Output, then click Export.
Create a Custom Application Status Portal and Content Blocks
See Also: Migrating Application Status Portals from XSLT to Views
Use Suitcase to import one of the Slate standard portals into your database to expedite this process. Alternatively, if you have custom application status portals in your database already, copy them and convert them for use with applications or rounds that don't use a custom status portal.
📖 Further Reading: Portals and Content Blocks
After you've created your custom status portal, don't forget to associated with a period or round in the Application Periods or Application Rounds tool.
Step 3: Removing Teasers
🔔 Important!Provision a test environment and proceed with the next two items (Remove Teaser Code from the XSLT files (optional), Delete Teasers) there. Confirm everything works as expected, then repeat these steps in your Production Environment.
Remove Teaser Code from the XSLT files (optional)
In the event you have an application period/round that does not use a custom status portal configured, the standard XSLT application status portal will be used instead. These portals are typically located in the Files tool as /apply/status.xslt. Some periods/rounds have their own XSLT status portals. These will appear similarly, with the period or round key showing as an additional directory (ex. /apply/GR/status.xslt). It's also possible you are using Teasers in XSLT portals that are not associated with any period or round. These will typically be saved in the /portal/ directory with a descriptive name (ex. /portal/alumni.xslt).
If you have fully transitioned to using custom status portals and are confident the XSLT portals will not be used in the future, you do not need to remove the Teaser code from the XSLT files. However, the XSLT portals will not function if the code remains after your Teasers have been deleted.
If desired, you can simply delete the status.xslt file if it will not be used. When no status.xslt file exists and no custom status portal is selected for a given period/round combination, a default status page will be displayed.
If you wish to continue using XSLT portals without Teasers, rather than using a custom status portal made with the Portals tool, take the following steps to identify and remove the Teaser code from an XSLT file:
Go to Database > Files, and search for 'teaser' using the search box.
Open the first result that is a file with the .xslt extension.
Within the XSLT file's code, search for instances of the word 'teaser'. You can use CTRL+F (PC) or CMD+F (Mac) to open the in-file search bar to quickly locate instances of 'teaser' in the file.
Teaser code will appear in XSL tags. There may be several instances of Teaser code within a single XSLT file. This code almost always follows the below syntax:
<xsl:if test="(teaser[@type = 'type_name'])"> <xsl:for-each select="teaser[@type = 'type_name']"> <xsl:copy-of select="html/node()" /> </xsl:for-each> </xsl:if>
Highlight and remove the Teaser code in sections, being careful not to unintentionally remove any other elements of the XSLT portal. If you want to continue using the XSLT portal, you may want to work with a web developer to confirm the portal still displays content in a satisfactory manner.
Click Save to confirm your changes.
Repeat for any additional .xslt files.
Delete Teasers
Once you have ended your dependence on Teasers, you can remove them from your database entirely. Follow these steps to delete your Teasers (for more information and screenshots on this process, see Batch Managing Resources).
Navigate to Database > Teasers (deprecated)
Hold the 'CTRL' key (PC) or 'CMD' key (Mac) and click on the first Teaser in the list. The Teaser should become highlighted yellow, and a 'Cogs' icon will appear near the top of the screen.
While holding both the 'SHIFT' key and the 'CTRL' or 'CMD' key, click the last Teaser in the list. The entire list should now be highlighted yellow.
Return to the top of the screen and click the 'Cogs' icon. This will open the Batch Management options.
Under Action, select Delete.
Click Submit.
If prompted, accept any confirmation prompts.