Um den aktiven Menüpunkt bei TYPOlight wieder zu verlinken, kopieren wir die Templatedatei "nav_default.tpl" aus dem Ordner "system/modules/frontend/templates/" und fügen diese in den Ordner "templates" ein. In der kopierten "nav_default.tpl" kann man dann anstatt des span-Elementes den entsprechenden Link einfügen. Hier sollte nur tunlichst darauf geachtet werden, dass die TYPOlight Syntax beibehalten wird, damit alle Funktionen erhalten bleiben. TYPOlight nutzt nun die Templatedatei aus dem Ordner templates im Rootverzeichnis der TYPOlight-Installatiton um das Menü zu generieren.
<ul class="<?php echo $this->level; ?>">
<?php foreach ($this->items as $item): ?>
<?php if ($item['isActive']): ?>
<li class="active<?php if ($item['class']): ?> <?php echo $item['class']; ?><?php endif; ?>"><a href="<?php echo $item['href']; ?>" title="<?php echo $item['pageTitle'] ? $item['pageTitle'] : $item['title']; ?>" class="active<?php if ($item['class']): ?> <?php echo $item['class']; ?><?php endif; ?>"><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>
<?php else: ?>
<li<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?>><a href="<?php echo $item['href']; ?>" title="<?php echo $item['pageTitle'] ? $item['pageTitle'] : $item['title']; ?>"<?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?><?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?><?php if ($item['tabindex']): ?> tabindex="<?php echo $item['tabindex']; ?>"<?php endif; ?><?php if ($item['nofollow']): ?> rel="nofollow"<?php endif; ?> onclick="this.blur();<?php echo $item['target']; ?>"><?php echo $item['link']; ?></a><?php echo $item['subitems']; ?></li>
<?php endif; ?>
<?php endforeach; ?>
Well, it looks very nice php code, I want to try it. But language problem. I tried to understand this post here on this site with the help of google translator but I could not understand properly how all this works. Anyway I think it is a very good plateform for professionals. If I have complete information, I think I can do something here like I am doing on my own project pdf books. Thanks for all this work. Very good work! I always like to leave comments whenever I see something unusual or impressive. I think we must appreciate those who do something especial. Keep it up.
David Mayer
geo tv live
Kommentar hinzufügen