T3MP Session Five: Extensions

Let's Add Extra Functionality to Our TYPO3

T3MP Session Five: Extensions

Intro

I got to see more of what you can do with TYPO3 in this session. How you can add additional functionality to your site further customising it.


Session 05

At the start of the program, I mentioned TYPO3's extensive extension library. This session focused on extensions - one extension in particular.

We looked at an extension listed in the library. How to install it, add it to the site and give the site new features.

The News Extension is what we worked with.

Tomas said this at the start of the session, and it made more sense as the session went on:

All plugins are extensions, but not all extensions are plugins

Extensions

Extensions in TYPO3 add extra functionality to your installation.

library.png

The are several kinds of extensions you can add to your site. Information about them can be found in the extension library where they are all listed.

For example, in Session Two I had to add a Twitter feed to a page using HTML. This can also be achieved using an extension.

Installing the News Extension

To install extensions, you have to first head over to the Extensions Module.

Here you will see everything currently installed on your site.

extensions.png

Then change the dropdown at the top to Get Extensions, search for News and install it.

installed.png

After installation, a News Administration Module will be added to your module bar.

Get News Working

Before you can start adding your news, you need to include the News Extension to your site.

We have to go to the Template Module, like we did in Session Three, and modify our site template.

template.png

Just like we did last time, we will select Edit the whole template record. Then select the Includes tab at the top. From there, select News on the right to include it and save.

include.png

With that done, we can now add our news. Now select the News Administration module.

Adding News Records

In order to have a structured layout of your data , it is advisable to create a folder to hold all your news data.

Either drag a folder to the page tree or right-click and create it.

With the folder you created selected, you now create your news records You can create 3 types of records with the news extension:

  1. News
  2. Tag
  3. Category

news admin.png

add news.png

When you have created your records, you need a place to put them. For that, we switch to the Page module.

Display News in Frontend

In the Page module, create a new page for your news. Then add the News plugin to the page.

add-plugin.png

There are a couple of settings that must be set within the news plugin for it to work correctly. Switch to the plugin tab, then under settings make sure these settings are set:

  • What to display: the type of view you want; List or Detail
  • Sort by: How you want your news sorted; Title, date
  • Sort direction: The sorting direction you want; ascending/descending
  • Startingpoint: This should point to the folder we created before.

pluginset.png

setting.png

Then switch to the additional tab and make sure these options are set:

  • PageId for single news display: This is the page for a single item of news
  • PageId for list display: The page for the list of news
  • PageId to return to: The page to go back to when viewing a single news item

settingadd.png

NOTE: After creating pages or folders, ensure that you enable them.

With that done, you can save and preview your news in the frontend.

newws.png

Plugin vs Content Element

Here is a breakdown of the differences between Plugins and Content Elements. The two are very similar so the distinction may not be clear at first.

PluginContent Element
Are 'plugged' into a pageAre placed on a page
For rendering of records with different viewsFor rendering single view records

Homework

For the homework, I had to:

  • get news working
  • have a list view and detail view for the news
  • have a separate folder for news and news images

This homework was straightforward enough, I did however have some difficulty with the extension on my installation. I am consulting Tomas on what might be going on.

Thoughts

Extensions were different, there is a bit more to setup to get them working. But when you get that done, you can do some cool things.

I am absolutely adding other extensions to my site.


Thank you for reading, let's connect!

Thank you for visiting this little corner of mine. Let's connect on Twitter and LinkedIn