MyBB Community Forums

Full Version: Using {$welcomeblock} outside header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there!
I'm trying to use the {$welcomeblock} in my navbar, inorder to make it abit more compact (It looks great with the theme I'm using) but i can't use {$welcomeblock} in my navbar (Atleast nothing happens)

Anyone have any idea as to how i can make it available? Smile


How it's being used in the header:
<div class="haut" style="height:140px">
	<a href="{$mybb->settings['bburl']}" id="logo"><i class="far fa-gem"></i>Title</a>
	<span class="useroptions">
		<ul id="menu-deroulant">
			{$welcomeblock}
		</ul>
	</span>
</div>


How I added it into the navbar:

<div class="navigation">
	<a href="{$mybb->settings['bburl']}/index.php"><span id="home_bit"><i class="fa fa-home"></i></span></a>
	<span>{$nav}{$activesep}{$activebit}</span>
<span class="useroptions">
	<ul id="menu-deroulants">
		{$welcomeblock}
	</ul>
</span>
</div>
You can't do that.
Why don't you add this code in header:
<div class="navigation">
	<a href="{$mybb->settings['bburl']}/index.php"><span id="home_bit"><i class="fa fa-home"></i></span></a>
	<navigation>
<span class="useroptions">
	<ul id="menu-deroulants">
		{$welcomeblock}
	</ul>
</span>
</div>
And change nav template with this:
<span>{$nav}{$activesep}{$activebit}</span>
(2019-01-08, 10:26 AM)chack1172 Wrote: [ -> ]You can't do that.
Why don't you add this code in header:
<div class="navigation">
	<a href="{$mybb->settings['bburl']}/index.php"><span id="home_bit"><i class="fa fa-home"></i></span></a>
	<navigation>
<span class="useroptions">
	<ul id="menu-deroulants">
		{$welcomeblock}
	</ul>
</span>
</div>
And change nav template with this:
<span>{$nav}{$activesep}{$activebit}</span>
Thank you, with minor tweaking to that code i was able to make it work Smile!