RocketTheme

General => Free/GPL/Tutorials Discussions => Topic started by: James S! on October 13, 2007, 08:17:57 AM



Title: Placeholder alternatives
Post by: James S! on October 13, 2007, 08:17:57 AM
Due to the nature of the placeholder, in certain templates, it is not styled resulting in some distasteful layout. The normal workaround is to use the link-url menu item to #. However, I post in Sporticus concluded with a better solution which I am going to demonstrate here.

Joomla 1.0x

1. Login into your Administrator
2. Go to Menu > mainmenu > New
3. Choose link-url as your Menu item
4. In the URL field, insert
Code:
javascript:void(0);
5. Fill in your other details and save.



Joomla 1.5
1. Login into your Administrator
2. Go to Menus > Main Menu > New
3. Choose "External Link" as your Menu item
4. In the link field, insert
Code:
javascript:void(0);
5. Fill in your other details and save.



Thanks to Brian D (http://www.rockettheme.com/option,com_smf/Itemid,190/action,profile/u,19989/)


Title: Re: Placeholder alternatives
Post by: MariO on November 12, 2007, 03:18:41 PM
May i ask if it works for J1.5  ..... if so what menu type please ?

Thanks James
MArio


Title: Re: Placeholder alternatives
Post by: James S! on November 12, 2007, 04:19:53 PM
See updated post.


Title: Re: Placeholder alternatives
Post by: MariO on November 13, 2007, 01:20:20 AM
Excelent :)

Thanks James !
Mario


Title: Re: Placeholder alternatives
Post by: Christopher Cordima on November 13, 2007, 07:20:02 PM
I have a very very large menu structure and found that when I remove the "href=" from this code:

case 3:
         // don't link it
         $txt = '<a href=\"#\" '.$active.' '. $id .$title.'><span>'. $txt .'</span></a>';
         break;

Found in the ja_cssmenu.php that my placeholder errors are solved, without having to use another method like the - link URL and javascript:void(0);    method.... does anyone know if removing this "href=" will cause any other unexpected problem?
 


Title: Re: Placeholder alternatives
Post by: James S! on November 14, 2007, 01:42:21 AM
That is a JA menu, so ask them ;)


Title: Re: Placeholder alternatives
Post by: Sergey Zainutdinov on April 08, 2008, 10:45:38 AM
Good,

I edited PHP to add <a href="#">.. :)


Title: Re: Placeholder alternatives
Post by: Rudy Leffler on April 08, 2008, 09:25:47 PM
YES! That works! :) Thanks!


Title: Re: Placeholder alternatives
Post by: Mark Smith on August 06, 2008, 08:12:39 AM
;D ABSOLUTELY BRILLIANT!  ;D

I was using the old # and it kept going back to the home page if clicked, This is a perfect solution.

Thank You
Mark


Title: Re: Placeholder alternatives
Post by: Steve Overton on August 20, 2008, 05:50:31 PM
The problem with this solution is that you get a hand on the top menu item indicating that you can click the top menu item and do something when all you want is the submenus to display, which will do something when clicked. It is better to leave the Link blank for the top menu and you get the same affect, the submenus appear, but you don't get the hand on the top menu.

Steve