Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
how to add a menu to header
Just started w/ vanilla-
i need a link back to the main part of my main part of the site... i need to know how to create links above the menu kind of like..on this site...
Lussumo Swell Blog | Documentation | Community
??? thanks,
0
This discussion has been closed.
Comments
If you have one of the development versions of Vanilla, here is how I did it:
if (in_array($Context->SelfUrl, array("index.php", "account.php", "categories.php", "comments.php", "post.php", "search.php", "settings.php"))) { class LussumoBanner extends Control { function LussumoBanner(&$Context) { $this->Name = "LussumoBanner"; $this->Control($Context); } function Render() { echo '<div class="BannerContainer"> <div class="Banner"> <a class="BannerLogo" href="http://lussumo.com"> </a> <div class="BannerMenu"> <a href="http://lussumo.com/swell">Lussumo Swell Blog</a> | <a href="http://lussumo.com/docs">Documentation</a> | <strong><a href="http://lussumo.com/community">Community</a></strong> </div> </div> </div>'; } } $LussumoBanner = new LussumoBanner($Context); $Page->AddRenderControl($LussumoBanner, $Configuration["CONTROL_POSITION_HEAD"]+1); $Head->AddStyleSheet("extensions/LussumoBanner/style.css"); }
It would be a similar type of process in 0.9.2.x, but the way it is added to the $Page object would be different.
I'd try something like this:
$Page->AddControl("Head_Render", $LussumoBanner);
For a title image not to affect anything, set it as the background of the main enclosing div. The css rule:
div { background:#999 url(link/to/the/image.jpg) repeat top left; }
Five parts then:
- The color (here #999) can be anything, but if the image is smaller than the banner area, make it something similar to where the image runs out.
- url(link/to/the/image.jpg) is the directory path.
- repeat the image (horizontally and vertically), repeat-x (horizontal only), repeat-y (vertically only).
- vertical placement: top, bottom, or something in-between, like halfway (50%), pixel offset (0 or even negative values).
- horizontal placement: left, right or relative, by pixels, as vertical.
I'm not sure if you can mix vertical placement words (top/bottom/left/right) with other measurement types.For an example, look how the Vanilla forum Header div wave image is placed in the background via CSS. (You meant this messing up the tabs not the Lussumo Banner extension, right?) Play with it a little.
and even if you do add a background to header h1 (the page title) you'd have to remove the text page title in application settings and when you do that it shows nothing not even the image