Recent Topics

1 Sep 19, 2011 04:14    

My b2evolution Version: 4.x

Is it possible to create nested menus for the top bar?
If so, guidance would be appreciated

http://www.revenantsoflordaeron.com/

Thanks
Zad

3 Sep 21, 2011 23:42

Thanks,
That is what I'm looking for. But now, how to do it :D
Not seeing any documentation.

4 Sep 22, 2011 09:36

ZadiasStark wrote:

Thanks,
That is what I'm looking for. But now, how to do it :D
Not seeing any documentation.

there is no documentation :P

a function called 'display_list_cats' (thanks to sam2kb) brings the page+category list.The function is as follows:

The rest is just css.


	function display_list_cats( $option_all = '' )
	{
		global $Plugins;
		
		ob_start();
		skin_widget( array(
			// CODE for the widget:
			'widget' => 'coll_category_list',
			// Optional display params
			'block_start'			=> '',
			'block_end'				=> '',
			'block_title_start'		=> '',
			'block_title_end'		=> '',
			'block_display_title'	=> false,
			'list_start'			=> '',
			'list_end'				=> '',
			'item_start'			=> '<li class="cat-item">',
			'option_all'			=> $option_all, // T_('All')
		) );
		
		$widget_cat = ob_get_clean();
		
		if( $widget_cat_fixed = @preg_replace( '~<a(.*?)href="(.*?)">(.*?)</a>~',
					'<a class="fadeThis" $1href="$2"><span class="entry">$3</span></a><a href="$2?tempskin=_rss2" class="rss_feed"></a>',
					$widget_cat ) )
		{
			echo $widget_cat_fixed;
		}
		else
		{
			echo $widget_cat;
		}
	}

insert the above code in your _skin.class.php file in your skin folder, and the below code where you want to display the menu -list-.

<div id="catnav"><ul id="categories_nav"><?php display_list_cats(); ?></ul></div>

5 Sep 29, 2011 17:16

:idea: Neat solution to a problem that has been puzzling me since starting with b2evo.

"tilqicom" wrote:

ZadiasStark wrote:

Thanks,
The rest is just css.

Which is easier said than done and it doesn't seem to display well without it.

I wish there was some documentation on the categories, how the widget works and how to modify it.
There are a number of other ways of presenting the list that could improve things. Also options such as list only used categories (ie postcount > 0)

6 Sep 30, 2011 02:34

I have a plugin that creates nested menus. Let me see if I can find it...

7 Sep 30, 2011 03:20

sam2kb wrote:

I have a plugin that creates nested menus. Let me see if I can find it...

That would rock!

9 Sep 30, 2011 07:33

Thanks alot :D

Do you have a site where its in use, so I can see if it meets what I want to do, before I install it?

10 Sep 30, 2011 07:40

No, it's only on my laptop.
Try it, it won't kill your server ;)

11 Sep 30, 2011 07:40

Well, I can make a screenshot...

13 Sep 30, 2011 11:30

Ah a solution to dropdown menu of blogs

but not quite the same as tilqicom's solution (w/o css) for dropdown menu of categories?

14 Sep 30, 2011 19:20

It does display dropdown of categories, just edit it a bit and delete the parent blog level leaving only categories list.


Form is loading...