Autonav with Individual Images and Texts
Permalink
Hy everyone,
i'm new to c5 and a little bit confused how i could solve this problem.
I have a second level autonav and the customer would like to add a individual image and a introduction text to each autonav link. so that you can click on the image to navigate to this link.
can i create something like this in a view template for the autonav block?
foreach ($navItems as $ni) {
echo '<li class="' . $ni->classes . '">'; //opens a nav item
$a = new Area("Content");
$a->display($c);
echo '<a href="' . $ni->url . '" target="' . $ni->target . '" class="' . $ni->classes . '">' . $ni->name . '</a>';
if ($ni->hasSubmenu) {
echo '<ul>'; //opens a dropdown sub-menu
} else {
echo '</li>'; //closes a nav item
echo str_repeat('</ul></li>', $ni->subDepth); //closes dropdown sub-menu(s) and their top-level nav item(s)
}
}
or do i need a whole new module for this problem?
i'm new to c5 and a little bit confused how i could solve this problem.
I have a second level autonav and the customer would like to add a individual image and a introduction text to each autonav link. so that you can click on the image to navigate to this link.
can i create something like this in a view template for the autonav block?
foreach ($navItems as $ni) {
echo '<li class="' . $ni->classes . '">'; //opens a nav item
$a = new Area("Content");
$a->display($c);
echo '<a href="' . $ni->url . '" target="' . $ni->target . '" class="' . $ni->classes . '">' . $ni->name . '</a>';
if ($ni->hasSubmenu) {
echo '<ul>'; //opens a dropdown sub-menu
} else {
echo '</li>'; //closes a nav item
echo str_repeat('</ul></li>', $ni->subDepth); //closes dropdown sub-menu(s) and their top-level nav item(s)
}
}
or do i need a whole new module for this problem?