Superfish from simple to complicate
Permalink
Hi all,
Want to know if someone can give me the light cause i just have no idea of how to realize this.
I want to go from simple Superfish menu (image 01.jpg) to a more detailed superfish (image 02.jpg) .
Has someone any clue about how to realize ?
Thanks in advance
Want to know if someone can give me the light cause i just have no idea of how to realize this.
I want to go from simple Superfish menu (image 01.jpg) to a more detailed superfish (image 02.jpg) .
Has someone any clue about how to realize ?
Thanks in advance
I understand what you say but which file i need to edit.
I create a custom template for superfish here :blocks/superfish/templates/PBL
I need to edit the view.php file, that's it ?
I create a custom template for superfish here :blocks/superfish/templates/PBL
I need to edit the view.php file, that's it ?
Yes. Just customize it as required. And when done, set the custom template to menu.
For the text that you enter in the "Description" text area attribute:
Rony
For the text that you enter in the "Description" text area attribute:
$c = Page::getCurrentPage(); $Desc = $c->getCollectionDescription();
Rony
so i did some change and i manage to get the description appear but only on the page after clicking menu (see pictures to understand)
I did this changes on the view.php file
as you told me on last post :
and for the description to appear
I did this changes on the view.php file
as you told me on last post :
foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); $c = Page::getCurrentPage(); $Desc = $c->getCollectionDescription();
and for the description to appear
if( $_c->getCollectionAttributeValue('dont_link') ){ echo('<li><a></a>'); }elseif ($ni->isActive($c) || strpos($c->getCollectionPath(), $_c->getCollectionPath()) === 0) { echo('<li class="nav-selected"><a class="nav-selected" href="' . $pageLink . '" '.($newWindow?'target="_blank"':'').'>' . $name . '<span>' . $Desc . '</span></a>'); }else { echo('<li><a href="' . $pageLink . '" '.($newWindow?'target="_blank"':'').'>' . $name . '</a>'); }
You need to call the same object which is used for displaying the menu title. I was just giving you an example to show the description on a page. My code only applicable for the current page as I'm using
If you still don't understand, just attach the view.php here. I'll customize it.
Rony
Page::getCurrentPage();
If you still don't understand, just attach the view.php here. I'll customize it.
Rony
I try again and again but i'm still able to show the description after clicking on the page, but not on the Homepage.
I attache the view.php (just have to rename the file *.php)
I attache the view.php (just have to rename the file *.php)
Here is the page. Let me know whether it is working or not.
Update: Page Updated. download the view.zip file & extract it.
Rony
Update: Page Updated. download the view.zip file & extract it.
Rony
No it's still the same, i have description after clicking on the link to the page but not on the homepage.
download the latest one.
You rock!! It works
So to know you add this :
And after you introduce the $desc in here :
That's it ?
So it means that the only point i didn't do before was to add this : $ni->getDescription(); to my file.
Thanks again
So to know you add this :
$Desc = $ni->getDescription();
And after you introduce the $desc in here :
if( $_c->getCollectionAttributeValue('dont_link') ){ echo('<li><a></a>'); }elseif ($ni->isActive($c) || strpos($c->getCollectionPath(), $_c->getCollectionPath()) === 0) { echo('<li class="nav-selected"><a class="nav-selected" href="' . $pageLink . '" '.($newWindow?'target="_blank"':'').'>' . $name . '<span>' . $Desc . '</span></a>'); }else { echo('<li><a href="' . $pageLink . '" '.($newWindow?'target="_blank"':'').'>' . $name . '<span>' . $Desc . '</span></a>'); }
That's it ?
So it means that the only point i didn't do before was to add this : $ni->getDescription(); to my file.
Thanks again
Also you have only add the description on active link. But now it is in both places.
Rony
Rony
i try to put on both place but i forgot this : $ni->getDescription();
thanks again
Chris
thanks again
Chris
Hi,
Sorry again but i try to ask my question here.
It seams that the second level didn't work in Superfish.
Have a look at the screencast in attached file.
Any help would be very nice.
Chris
Sorry again but i try to ask my question here.
It seams that the second level didn't work in Superfish.
Have a look at the screencast in attached file.
Any help would be very nice.
Chris
Rony