From 5f9483c7436a68df7f8449968153e9bf0a4d097b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helmut=20Schottm=C3=BCller?= Date: Mon, 14 Mar 2016 11:45:34 +0100 Subject: [PATCH] Update README.md --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f6544ab..dec8c8a 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,8 @@ For a meaningful usage of a tag cloud you should enter a destination page in the * Module News archive: Shows all news articles that are tagged with a selected tag. The heading of the news archive will be shown with the selected tag and the number of selections. * Module Newslist: Shows all news articles that are tagged with a selected tag. The heading of the news archive will be shown with the selected tag and the number of selections. * Module Global article list: Show a list of articles that are tagged with a selected tag. The heading of the article list will be shown with the selected tag and the number of selections. -* Module Event list: Shows all events of a selected calenders that are tagged with a selected tag. The heading of the event list will be shown with the selected tag and the number of selections. +* Module Event list: Shows all events of selected calenders that are tagged with a selected tag. The heading of the event list will be shown with the selected tag and the number of selections. +* Module Calendar: Shows all events that are tagged with a selected tag. Output the tags of an event when you change the default calendar template. * Module Tag object list: Shows lists of content elements (pages, articles, content elements) with given tags. ### Showing the assigned tags in the frontend @@ -159,6 +160,48 @@ The CSS styles for this output are already defined in the example CSS files tags ![Additional tags at the bottom of a news list entry](https://cloud.githubusercontent.com/assets/873113/12077872/58849b90-b1f9-11e5-9b49-b6e92f243b04.png) +For **calendar modules** it's up to you if you want to show the tags of an event in the calendar. To do so, you need to modify the default calendar template `cal_default` or you create your own `cal_default` based template. To show the tags you can access the `tags` or `taglist` fields of the respective events, e.g. + +```php + +
+ > +
+ +
+ +
+
+ +``` + +The `tags` field contains an array with all available tags for an event, e.g. + +```php +Array( + [0] => conference + [1] => meeting +) +``` + +The `taglist` field contains an array of arrays which contain the URL for the tag, the tag name and the tag class, e.g. + +```php +Array( + [0] => Array( + [url] => conference + [tag] => conference + [class] => conference + ) + [1] => Array( + [url] => meeting + [tag] => meeting + [class] => meeting + ) +) +``` + + ## Content elements The tags extension extends the Contao content element Heading and introduces an additional parameter Show with tags only into the expert settings. If you check this option Contao only shows the heading if one or more tags are used on the content page, e.g. if the page was opened from a tag cloud.