some default.master.tpl files and the main menu
sottwell
New
In the default applications/dashboard/views default.master.tpl the main menu is built using the $this->Menu->AddLink function. However, the theme I'm trying to customize, Nebula, uses a different structure altogether.
It has an unordered list with items like {dashboard_link} and {discussions_link}. Where are these defined? How does one go about customizing this menu?
Other themes use this same structure, such as the EmbedFriendly and mobile themes that come with the installation.
0
Comments
I finally tracked it down in the SmartyPlugins folder, and added a {home_link} to my default.master.tpl file, but should I be modifying these Smarty plugins? Can they be overridden like the default Vanilla views are?
I posted a comment on your other thread relating to smarty.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
you could paste a homemade function like this in the
library/Vendors/SmartyPlugins
function.mysigninout_link.php
<?php if (!defined('APPLICATION')) exit(); function smarty_function_mysigninout_link($Params, &$Smarty) { $Wrap = GetValue('wrap', $Params, 'li'); return Gdn_Theme::Link('signinout', GetValue('text', $Params, ''), GetValue('format', $Params, Wrap('<a href="%url" class="%class mysigninout">%text</a>', $Wrap))); }then you could call it from default.master.tpl
with this
{mysigninout_link}
it would add the class mysigninout to the list of classes.
the %class is just a placehoder that gets string replaced with $Class
$Class gets acted upon in class.theme.php depending on the parameter e.g. activity signin - it add the appropriate class which in the case of signin is
"SignInPopup" which allows the signin popup to occur.
if however the line in you function said this
GetValue('format', $Params, Wrap('<a href="%url" class="mysigninout">%text</a>', $Wrap)));there would be no %class and consequently SignInPopup class wouldn't be assigned and the signin page would not be a popup but a normal non-popup signin page.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.