The following options are suitable for implementation by more advanced users. However, basic users become advanced users only by tackling more and more advanced options, so if you're ready to explore the breadth and depth of the SMS extension, check out some of the following options.
This section is divided into six main parts: Layout Modifications, Performance Modifications, Adding a Custom Resource Type, Simplified TypoScript Example, Adding a New Plugin Resource Type, and Adding XML Feeds.
There are three ways you can change the look and feel of the Frontend display of your Sermon Records:
The SMS extension's Constant Editor provides the easiest method for changing the layout; however, it has limited options.
If you're familiar with Cascading Style Sheets (CSS), then modification of the SMS extension's CSS files provides you with significant opportunities for changing the display on the Frontend.
By far the most powerful of the options is to modify the SMS extension's template. By modifying the SMS template, you have absolute control over virtually every aspect of the look and feel of the Frontend.
Although there are only three default Layouts, there are also six Display options. Up until now, you've only been introduced to two different displays: List and Search. There are four other displays that affect the look and feel of the Frontend.
Note: The difference between a Layout and a Display may seem obscure, but they refer to two very different aspects of the SMS extension.
Layout: Determines what information from the Sermon Record is displayed. Default Layouts include Brief, Verbose, Series, and Customized.
Display: Determines how the information from the Sermon Record is displayed. The List Display presents the information in a list. The Search Display presents information that has been recalled using search terms. The Single Display presents the information on an additional page. The Latest Display sorts and displays the information based on date.
In the default setup of the SMS extension, when a Frontend user chooses to view the details of an individual sermon record, the accessible information is limited by the chosen Layout (Brief, Verbose, Series, or Customized). However, by using the Single Display, you can change the amount of information displayed on single views of a sermon record.
To utilize the Single Display option you must create an additional page, add and configure the SMS plugin on the new page, and change a few Static Template settings through the Constant Editor. (Refer to Step 5: Add and Configure the SMS plugin for a refresher on how to install the SMS plugin.)
Illustration 24: Viewing a Page ID
Create a New Page titled Single as a subpage to Sermons.
Set the Page Type to Not in menu.
Add the SMS plugin Content Element to the new Single page.
Configure the What to Display field to Single.
In the SMS plugin, select Layout to whatever option you prefer (generally, you'll want to choose either Verbose or a Customized layout).
If you choose to configure your Single Display to Series, you will also have to change the List View Settings: Group by to Sermon Series.
Refer to Illustration 25. Using the Template Module (1), select the root page of your website (2).
Select Constant Editor from the dropdown box on the right (3).
Select PLUGIN.TX_WECSERMONS_PI1 from the Category dropdown box (4).
Check the following boxes: Single View – Single PID and List View – List PID and then click Update.
Put the Page ID number of the Single page in Single View – Single PID field, the List View – List PID field and the Search View – Search PID field and click Update. (To find the Single page's ID number, pass your cursor over the Single page icon and the page ID will be displayed – see Illustration 24.)
The Latest Display limits the number of sermons displayed on the Frontend to the most current sermons. By default, this is set to the last twenty sermons, as determined by their occurrence dates. These defaults can be changed using the Constant Editor (see Layout Options in the Constant Editor).
To use the Latest Display, simply change the What to Display field in the SMS plugin to Latest.
This display option is similar to the SINGLE display. Both display the detail of only one SMS record at a time, but where the SINGLE display is used in conjunction with the LIST display, CURRENT can be used by itself, and will show the sermon or series record which has the "current" check box checked. (see Illustration 25)
Illustration 25: Marking a Record as Current
Note: As of version 0.9.12 of the Sermon Management System, only the SMS Series and SMS Sermons records support the "current" state.
Note: At any given time, only one SMS Sermons record can be set as current, and only one SMS Series record can be set as current. By setting a new record as current, this state is removed from the previous record.
The CURRENT display can be used by organizations that wish to manually control which sermon or series is being actively discussed or promoted - hence the current sermon or series. This allows future sermons or series to be input into the SMS and made visible throughout the site, while still maintaining the currently promoted sermon or series. By enabling the "current" check box on a record, the organization can control which record is shown by the CURRENT display.
This display option is identical to the CURRENT display, but instead of displaying the record marked as "current", the previously occurring record is displayed. The "previous" sermon is determined by the sermons occurrence date, and the "previous" series is determined by the series end date.
F.e. In the table below we have two example sermons records. The sermon with UID=72 is marked as the current, therefore the "previous" sermon is Joshua and Gideon, as it is the sermon occurring before the "current" sermon as determined by the occurrence date.
Sermon Title | UID | Occurrence Date | Current |
Joshua and Gideon | 39 | 3-1-07 | 0 |
Moses and the Exodus | 72 | 4-1-07 | 1 |
Abraham and Sarah | 42 | 5-1-07 | 0 |
The PREVIOUS display allows an organization to provide a "Last Week's Sermon" page, or a "Previous Series" page.
Technical Stuff: Both the CURRENT and the PREVIOUS displays use the constant editor and TypoScript configuration options as the SINGLE display. Please customize either the CURRENT or PREVIOUS displays, as you would the SINGLE display.
There are a number of layout modifications you can make via the TYPO3 Constant Editor, including the number of sermons displayed on a single screen and the addition of some header information. Other available options in the Constant Editor are described in the Performance Modifications section.
Illustration 26: Accessing the TYPO3 Constant Editor
To access the TYPO3 Constant Editor (refer to Illustration 26):
Using the Template Module (1), select the root page of your website (2).
Select Constant Editor from the dropdown box on the right (3).
Select PLUGIN.TX_WECSERMONS_PI1 from the Category dropdown box.
This will bring up the Constant Editor form for the SMS extension revealing the available options.
There are two steps necessary to change an optio
Illustration 27: Editing Constant Options
n (refer to Illustration 27):
Check the box in front of any option/s you want to modify (1) and click Update (2).
When you have updated the form, an additional field will appear next to the check boxes you have selected. Make the appropriate modifications to these fields and click Update when you've finished to save the changes you've made. Modifications are viewable immediately in the Frontend.
Although there are a plethora of options in the Constant Editor, only a handful relate to the layout of the SMS extension. We will look only at the Layout options in this section. For the other options, refer to the Performance Modifications section.
Enable Smart Display: Smart Display is the ability for the plugin to automatically switch from a LIST or LATEST display mode to SINGLE display mode when it detects a request for the details of a record to be shown. When this is enabled, you do not explicitly need a separate page set up to display the detail of a record in a SINGLE view. This is enabled by default, but in some cases you may wish to disable this feature.
List View – Enable Empty Groups: This will display groups in the List View that have no related Sermon Records attached to them. For instance, if you have created a Sermon Series but have not yet assigned a sermon to it, then enabling this Layout option would allow the Sermon Series to display on the Frontend.
Latest View – Enable Empty Groups: This will display groups in the Latest View that have no related Sermon Records attached to them. For instance, if you have created a Sermon Series but have not yet assigned a sermon to it, then enabling this Layout option would allow the Sermon Series to display on the Frontend.
Illustration 28: Navigation: Max Pages Shown
List View – Max Pages Shown: This option affects the navigation links that determines how many Page links will be displayed on the Sermons page (see Illustration 28).
List View – Maximum Group Results: This option determines how many Sermon Series will be displayed on your Sermons page when using the List View display.
List View – Maximum Detail Results : This option determines how many sermons at a time will appear on your Sermons page in the List View.
Latest View – Maximum Group Results: This option determines how many Sermon Series will be displayed on your Sermons page when using the Latest View display.
Latest View – Maximum Detail Results: This option determines how many sermons at a time will appear on your Sermons page in the Latest View.
Header for Related Topics: Using this option, you can create a header for the Related Topics listed on the Sermons page.
Header for Seasons: Using this option, you can create a header for the Seasons listed on the Sermons page.
Header for Series Start Date: Using this option, you can create a header for the Series Start Date that is listed on the Sermons' Detail page.
Header for Series End Date: Using this option, you can create a header for the Series End Date that is listed on the Sermons' Detail page.
Header for Speaker: Using this option, you can create a header for the Speaker that is listed on the Sermon's Detail page.
Tip: Once you have populated a dozen or more Sermon Records, we would encourage you to experiment with these Constant Editor options. For instance, add a header for a speaker such as “Brought to You by: ” to see what effect it has on your display. You can always undo your experiment by removing the check mark from the options check box.
The SMS extension provides three default layouts (Brief, Verbose, and Series) and a fourth called Customized. In point of fact, all four layouts are customizable by modifying the SMS Template.
Tip: We recommend editing only the Customized Layout on your first couple of modification attempts in order to preserve the basic layouts as models.
Caution:
Modifying the SMS Template is not a task for the uninitiated. A knowledge of basic HTML and CSS are essential to make successful modifications. Poor coding can render the template unusable.
Modifying the template is a three step process:
Download the SMS Template File
Modify the Template File
Upload and Activate the Modified Template File
Illustration 29: Downloading the Template
The default template file, wecsermons.tmpl, is tucked away in the deep recesses of TYPO3. To download the SMS Template:
Refer to Illustration 29. Open the Ext Manager Module (1).
Click the Loaded Extensions option under the Menu: drop down box (2).
Scroll down the list of extensions and click on the WEC Sermon Management System link (3).
Illustration 30: Downloading the Template
Refer to Illustration 30. Select Edit files from the dropdown list (4).
Scroll down the file list and click on pi1/wecsermons.tmpl (5).
Save the file onto your local computer. You may change the name of the file if you'd like; however, the extension .tmpl should not be changed.
Note: If your browser gives you the option to Open or Save the template file, choose to Save the file. Opening the file will result in a loss of significant information.
Tip: For an alternative way to access the Template file, see Modifying the CSS File section.
Once you've downloaded and saved the wecsermons.tmpl file on your local computer, it is simply a matter of opening the file in your favorite HTML editor (MS Notepad, Write, Dreamweaver, etc.) and modifying the file.
Caution: Although the SMS Template is highly customizable, do not change the names of the Layout Styles as this will render the template unreadable by the SMS plugin.
Technical Stuff:
How the Template Works. As you view the template in your HTML editor, you will see what looks like a “nearly” standard HTML file. The file is wrapped in <html>, <head>, and <body> tags like most web pages. However, the template uses markers to direct TYPO3 to reference and render only relevant portions of the file (for instance, only the Brief Layout, etc.). Each marker is itself wrapped in triple hash marks such as ###BRIEF###. Each of the markers are defined at the top of the template itself for your convenience (see also the table below).
SMS Markers | |||
Usage | Marker Name | Displays... | Syntax |
SERMON | |||
SERMON_TITLE | Sermon Title | ###SERMON_TITLE### | |
SERMON_SUBTITLE | Sermon Subtitle | ||
SERMON_OCCURRENCE_DATE | Date Sermon was Presented On | ||
SERMON_DESCRIPTION | Description or Detail of a Sermon | ||
SERMON_SCRIPTURE | Scriptures the Sermon Refers to | ||
SERMON_GRAPHIC | A Graphic Shown with the Sermon | ||
SERMON_ALTTITLE | Alt or title text used with the graphic | ||
RESOURCES | |||
RESOURCE_TITLE | Title of Resource | ||
RESOURCE_DESCRIPTION | Full Resource Description | ||
RESOURCE_GRAPHIC | Graphic of Resource | ||
RESOURCE_ALTTITLE | Alt or title text used with the graphic | ||
RESOURCE_FILE | The Filename of an Uploaded Resource | ||
RESOURCE_WEBADDRESS1 | A URL Associated with this Resource | ||
RESOURCE_WEBADDRESS2 | A URL Associated with this Resource | ||
RESOURCE_WEBADDRESS3 | A URL Associated with this Resource | ||
RESOURCE_CONTENT | The Resource Content Generated through TypoScript that Allows Output of Resources that cannot be Accomplished through Marker Tags Alone | ||
SERIES | |||
SERIES_TITLE | Title of Sermon Series | ||
SERIES_DESCRIPTION | Description of Series | ||
SERIES_SCRIPTURE | Scriptures the Series Refers to | ||
SERIES_STARTDATE | Start Date of the Series | ||
SERIES_ENDDATE | End Date of the Series | ||
SERIES_GRAPHIC | A Graphic Used with the Series | ||
SERIES_ALTTITLE | Alt or title text used with the graphic | ||
TOPIC | |||
TOPIC_TITLE | Title of the Topic | ||
TOPIC_DESCRIPTION | Description of the Topic | ||
SEASONS | |||
SEASON_TITLE | Title of the Season | ||
SEASON_DESCRIPTION | Description of the Season | ||
SPEAKERS | |||
SPEAKER_FIRSTNAME | First Name of the Speaker | ||
SPEAKER_LASTNAME | Last Name of the Speaker | ||
SPEAKER_URL | Speaker's Home Page or URL to their Bio | ||
SPEAKER_PHOTO | Photograph of the Speaker | ||
SPEAKER_ALTTITLE | Alt or title text used with the graphic | ||
SPEAKER_EMAIL | Speaker's Email Address | ||
SUBPART MARKER | |||
CONTENT | Container for Primary Template Contents: Required Marker for All Records | <!-- ###CONTENT### --> ... <!--###CONTENT###--> | |
ITEM | The Repeating Content Representing One Record within a List: Required in List Layout | ||
GROUP | Used only when the Group By option of the plugin is defined | ||
SERMON_SPEAKERS | Listing of Speakers Related to a Sermon | ||
SERMON_TOPICS | General Topics Associated with the Sermon | ||
SERMON_SERIES | Sermon Series Associated with a Sermon | ||
SERIES_SEASON | Season Associated with a Series | ||
SERIES_TOPICS | General Topic Associated with a Series | ||
DEFAULT_RESOURCES | The Subpart Name of the Default Resource Type | ||
WRAPPED SUBPARTS | |||
SERMON_SERIES_LINK | Link to Sermon Series' Single Layout | <!-- ###SERIES_LINK### --> ###SERIES_TITLE### <!-- ###SERIES_LINK### --> | |
SERMON_LINK | Link to a Sermon's Single Layout | ||
RESOURCE_LINK | Link to a Resource's Single Layout | ||
TOPIC_LINK | Link to a Topic's Single Layout | ||
BACK_LINK | Link Back to the List Layout | ||
LANGUAGE MARKERS | |||
BACK_TO_LIST | Text to Return to List-Layout from Single-Layout Template | ||
MISC | |||
ALTERNATING_CLASS | Class Attribute Inserted for Alternating Odd/Even Rows in List Views | <div class='###ALTERNATING_CLASS###'> | |
BROWSE_LINKS | AKA the “Browsebox.” Pagination Link in List Layout (Page 1 . Page 2). Place Outside of Content Subsection Tags. | ###BROWSE_LINKS### |
Modifying the template is a matter of combining standard HTML tags with the SMS Markers. In general, the HTML tags dictate the format and layout of your Frontend display, while the Markers dictate what information is displayed. However, the importance of Subpart Markers cannot be overstated. Subpart Markers tell TYPO3 that particular sections of the HTML page are accessible to the SMS extension. In addition, the Subpart Markers denote particular subsections of the layout. Subpart Markers are encapsulating markers, that is, they work like opening and closing tags. However, note that the formatting is unlike HTML tags; instead, they simply repeat themselves at the beginning and end of a section and look a bit like a pair of HTML comments:
<!-- ###SUBPART_MARKER### -->
Your <HTML TAGS> and
###SMS_Markers###
are nested between Subpart Markers
<!-- ###SUBPART_MARKER### -->
In addition, you can append comments within the Subpart Markers for your own clarification:
<!-- ###SUBPART_MARKER### beginning of marker -->
Finally, Subpart Markers may be nested as needed. For instance, the marker
<!-- ###SERMON_SPEAKERS### --> will be nested within <!-- ###CONTENT### --> and so on:
<!-- ###TEMPLATE_SERMON_CUSTOMIZED### begin template 4 -->
<!-- ###CONTENT### begin -->
<!-- ###SERMON_SPEAKERS### begin -->
###SPEAKER_FIRSTNAME###, ###SPEAKER_LASTNAME###
<!-- ###SERMON_SPEAKERS### end -->
<!-- ###CONTENT### end -->
<!-- ###TEMPLATE_SERMON_CUSTOMIZED### end template 4 -->
Note: Although the convention is to capitalize the name of the Markers, they are not case sensitive.
When modifying the template, bear in mind that you may need to modify each of the Display options: List, Single, Latest, and Series, depending on your desired layouts. For instance, if you were to modify Layout 4 (the Customized Layout), you will likely need to modify the following Subparts of the Template:
###TEMPLATE_SERMON_CUSTOMIZED###
###TEMPLATE_SERIES_CUSTOMIZED###
###TEMPLATE_SPEAKER_CUSTOMIZED###
Each of these Subparts defines the specific view options you've chosen in the SMS extension. Of course, you only have to modify the views you've chosen to display in the Frontend.
Most of the modifications of the template itself are self-evident, assuming you have some HTML formatting experience. By looking at the existing template file, you should be able to discern the general syntax of the template itself. However, below is an example of a formatted layout that uses both in-line and CSS formatting.
<!-- ###TEMPLATE_SERMON_CUSTOMIZED### begin -->
<!--###CONTENT###-->
<!--###ITEM###-->
<p class=“sermon_title”>Sermon Title:
<!--###SERMON_LINK### wrapped subpart indicating a link -->
###SERMON_TITLE###
<!--###SERMON_LINK###--></p>
<!--###SERMON_SERIES### begin -->
<div id="series" class="blue_background">
<p class=“sermon_title”>Sermon Series:
<!--###SERIES_LINK###-->
###SERIES_TITLE###
<!--###SERIES_LINK###-->
</p>
</div>
<!--###SERMON_SERIES### end -->
<!-- ###ITEM### -->
<!-- ###CONTENT### -->
<!--###TEMPLATE_SERMON_CUSTOMIZED### end -->
Illustration 31: A Complex Template Example
Of course, this is a very simple template that only displays a list of sermon titles and their related series. Literally, the sky is the limit when it comes to creating a modified template. For instance, Illustration 31 shows a screenshot of Ginghamsburg UMC's SMS extension. The SMS extension's display on your site will depend on the layout you choose, the modifications you make to the template, and to the HTML and CSS formatting of your site.
Once you have finished editing the Template file, save it. You may rename the file for your own reference if desired, but the extension .tmpl should not be changed.
Once you've successfully modified the Template file, upload and activate the file by:
Illustration 32: Choosing Your Upload Location
Refer to Illustration 32. Click the Filelist Module (1), select the folder where you wish to upload your file to, (2) and click the Upload Files button (3).
Illustration 33: Upload the Modified Template File
Refer to Illustration 33. Click the Browse button (4) to open the File Upload dialog box, browse to your modified file, open it, and click the Upload files button (5).
Illustration 34: Template File After Upload
Refer to Illustration 34. Your modified template should now be uploaded to the location you chose. In our example here, the path to that location is: fileadmin/templates/ extensions/wecsermons.tmpl
Tip: We will use this path a few steps later, so you may wish to make a note of the path you used at this time.
Illustration 35: Modifying the Template Constant
Refer to Illustration 35. Click the Template module (6), and click the page where your SMS plugin is configured (7).
Choose the Constant Editor from the drop down list in the upper right corner of the page (8), and chose PLUGIN.TX_ WECSERMONS_PI1 from the Category: drop down list (9).
Illustration 36: Specify New Path for Template File
Refer to Illustration 36. Scroll down the page to the Files constants section and check the box for the Template File Path, (10) scroll back up and click Update (11) to enable the text input box.
In the text input box for Template File Path, insert the path you noted from Illustration 33 (10). Scroll back up and click the Update button once again (11).
Illustration 37: Preview the Page
Refer to Illustration 37. You should be able to click the View Webpage icon (12) and see your new template in action.
If at any point you need to change the template, you can modify it on your computer and upload the file again. (Be sure to click the checkbox Overwrite existing files, shown in Illustration 32.) You can also modify the file through the Filelist module, by editing the file in-place as shown in Illustration 38.
Illustration 38: Modifying a File on the Website
One of the most powerful ways to control the look and feel of your SMS Layout is to edit the SMS extension's CSS file. CSS is a design or styling language that explains how web pages should be formatted. Using a CSS reference will help you greatly in designing your page style.
Caution: Modifying the SMS CSS file is not a task for the uninitiated. A knowledge of basic HTML and CSS are necessary to make modifications. Poor coding can render the template unusable.
Modifying the CSS file is a three step process.
Illustration 39: Locating the CSS File
Refer to Step 1: Download the SMS Template for similar instructions to downloading the CSS file.
Refer to Illustration 39. Open the Ext Manager Module (1).
Click the Loaded Extensions option under the Menu: drop down box (2).
Scroll down the list of extensions and click on the WEC Sermon Management System link (3).
Illustration 40: Downloading the CSS File
Refer to Illustration 40. Select Edit files from the dropdown list (4).
Scroll down the file list and click on res/tx_wecsermons_ styles.css (5).
Save the file onto your local computer. You may change the name of the file if you'd like; however, the extension .css should not be changed.
Modify the CSS file by using any standard text editor or HTML editing program.
Refer to Step 3: Activate the Modified Template File for similar instruction to activating the CSS File.
Illustration 41: Modifying a File on the Website
Refer to Illustration 41. Click the Filelist Module (1), select the folder where you wish to upload your file to, (2) and click the Upload Files button (3).
Illustration 42: Upload the Modified Template File
Refer to Illustration 42. Click the Browse button (4) to open the File Upload dialog box, browse to your modified file, open it, and click the Upload files button to upload the files into the TYPO3 upload folders (5).
Illustration 43: CSS File After Upload
Refer to Illustration 43. Your modified template should now be uploaded to the location you chose. In our example here, the path to that location is: fileadmin/templates/ extensions/ tx_wecsermons_ styles.css
Illustration 44: Modify the TYPO3 Template Record
Refer to Illustration 44. Click the Template module (6), and click the page where your SMS plugin is configured (7).
Choose the Constant Editor from the drop down list in the upper right corner of the page (8), and chose PLUGIN.TX_ WECSERMONS_PI1 from the Category: drop down list (9).
Illustration 45: Specify New Path for CSS File
Refer to Illustration 45. Scroll down the page to the Files constants section and check the box for the CSS File Path, (10) scroll back up and click Update (11) to enable the text input box.
In the text input box for Template File Path, insert the path you noted from Illustration 42 (10). Scroll back up and click the Update button once again (11).
Illustration 46: Preview the Page
Refer to Illustration 46. You should be able to click the View Webpage icon (12) and see your new template in action.
If at any point you need to change the template, you can modify it on your computer and upload the file again. (Be sure to click the check box Overwrite existing files, shown in Illustration 41.)