Du bist nicht angemeldet. Der Zugriff auf einige Boards wurde daher deaktiviert.
Seiten: 1
#1 05. November 2013 21:36
- Serialthunder
- hat von CMS/ms gehört
- Registriert: 13. März 2013
- Beiträge: 5
[GELÖST] cgcalendar 1.11.4 Kategorien im Zusammenfassungstemplate ausgeben
Hallo @ all!
Ich habe heute mein Modul cgcalendar auf 1.11.4 geupdatet. Soweit läuft alles noch, nur im Zusammenfassungstemplate habe ich jetzt ein kleines Problem entdeckt.
Bisher habe ich dort mit folgendem Aufruf die Kategorien mit ausgegeben:
{foreach from=$event.categories item="category" key="name"}
{$name},
{/foreach}
Leider funktioniert das nach dem Update nicht mehr. Ich erhalte lediglich den Zahlenwert der Kategorie. Hat jemand eine Idee welche Variable ich jetzt abrufen muß?
Gruß
Andreas
Offline
#2 05. November 2013 22:10
- Andynium
- Moderator
- Ort: Dohna / SN / Deutschland
- Registriert: 13. September 2010
- Beiträge: 7.018
- Webseite
Re: [GELÖST] cgcalendar 1.11.4 Kategorien im Zusammenfassungstemplate ausgeben
Schau mal, ob an der $event Variablen etwas geändert wurde
<pre>{$event|print_r}</pre>
Offline
#3 05. November 2013 22:14
- nockenfell
- Moderator
- Ort: Gontenschwil, Schweiz
- Registriert: 09. November 2010
- Beiträge: 2.934
- Webseite
Re: [GELÖST] cgcalendar 1.11.4 Kategorien im Zusammenfassungstemplate ausgeben
Die Release Notes sind unüblich ausführlich:
** Note: There probably will be compatibility problems for people upgrading to CGCalendar 1.11.x and beyond from previous versions. Particularly related to the dropped parameters (see below) and some of the inline fixes and changes. You will need to do testing on your CGCalendar installs and fix any calls to CGCalendar, and also make some changes to templates. **
Bug fixes.
- Dropped the column parameters (this is a design related item, not related to business logic and should be done in templates.).
- Dropped the returnlink parameters as they didnt work properly. This should be done in the templates. (history.go(-1) or something).
- Dropped the first-day-of-week parameter, and replaced it with a preference.
- All navigation links on prototype templates now use non-inline URLS.
- Added display=weeklist
- Refactored the event display in the admin panel.
- Events are now displayed only for a specified month and year.
- Easy selection of month and year, and scrolling between months.
- The ability to edit a parent event from a child event.
- Filters are stored in the user session.
- Refactored and checked all parameters passed to navigation links in the individual vieews
- All navigation views have in_ and ni_ variants to allow selecting an inline, or non inline variant of the navigation link. Though the ni_ prefixed URLS may infact be inline links depending upon the use_session stuff.
- Day view URLS from the calendar view now have ni_ and in_ variants.
- The inline parameter is deprecated, and will be dropped at the next major version.
- Refactored all event views
- All event views use the cgc_event_loader class.
- Optimize custom field, and category loading.
- Custom fields and categories are now copied from the parent event if not specified for the child event.
- All links/URLs generated to events use pretty URLS (if enabled) and are non inline.
author field may be present for each event that has an author... but authorname (which was inconsistently applied) has been dropped. Use a smarty plugin to extract the author information and display it.
- use_session now automatically turns on inline mode.. and will use inline mode for even ni_ links/urls
- use_session value is only used as a prefix for the session key. The session key is unique to all calls of CGCalendar.
- field output is now consistent with field ordering (by default).
- Refactored the admin categories tab.
- Adds drag and drop reordering.
- Refactored the admin fields tab.
- Adds drag and drop reordering.
- Adds the ability to specify wether a text area field has a wysiwyg (admin interface only).
- More
[dieser Beitrag wurde mit 100% recycled bits geschrieben]
Mein Blog / Diverse Links rund um CMS Made Simple
Module: btAdminer, ToolBox
Offline
#4 06. November 2013 08:22
- Serialthunder
- hat von CMS/ms gehört
- Registriert: 13. März 2013
- Beiträge: 5
Re: [GELÖST] cgcalendar 1.11.4 Kategorien im Zusammenfassungstemplate ausgeben
@nockenfell: Ja, das hatte ich vor dem Update schon bemerkt und auch mit Nacharbeiten gerechnet, aber es fand sich nirgendwo ein Hinweis auf Templateänderungen bezüglich der Kategorieausgabe.
@cyberman: In der Tat hat sich wohl an den Variablen etwas getan:
[categories] => Array
(
[0] => 2
[1] => 3
[2] => 4
)
[category_names] => Ausbildung, Veranstaltungen, Einsatz
Es sollte also jetzt ausreichen, wenn man einfach "category_names" ausgibt.
Man ersetzt also die foreach-Schleife
{foreach from=$event.categories item="category" key="name"}
{$name},
{/foreach}
durch
{$event.category_names}
Problem gelöst! Danke für die Hinweise!
Beitrag geändert von Serialthunder (06. November 2013 08:23)
Offline
Seiten: 1