PDA

View Full Version : template_hook.navtab_end


paradoxG(r)eek
02-28-2017, 10:06 AM
Hell all,

Which <hookname> do I need to use in a plugin so I can add the code below?


$templater = vB_Template::create('modreg_navbar');
$template_hook['navtab_end'] .= $templater->render();


I tried all navbit* hooks plus cache_templates and others but nothing appears on the right of "Quick Links" where I want to add a popup menu.

Thank you
Chris

--------------- Added 1488302193 at 1488302193 ---------------

I read somewhere an example using process_templates_complete but even this does not works.

paradoxG(r)eek
02-28-2017, 03:31 PM
Strange. Didn't noticed that the menu created but in the tabs row. How I can add it on the right of Quick Links? What is the hookname there. From what I seen in the template is navtab_end

paradoxG(r)eek
03-01-2017, 03:33 PM
I tried navbar_end ... No results... And a dozen others like before_community, after_community etc etc. The code appears only in tabs (end). The template code is:

<li class="popupmenu" id="vbmenu_modreg">
<a href="javascript://" class="popupctrl">{vb:var vbphrase.modreg_link_registrations}</a>
<ul class="popupbody popuphover">
<li id="modreg_moderate"><a href="modreg.php?do=moderate">{vb:var vbphrase.modreg_link_moderate}</a></li>
<li id="modreg_log"><a href="modreg.php?do=log">{vb:var vbphrase.modreg_link_log}</a></li>
<li id="modreg_fylkes"><a href="modreg.php?do=fylkes">{vb:var vbphrase.modreg_link_fylkes}</a></li>
</ul>
</li>

Lynne
03-01-2017, 03:40 PM
You may have to do some sort of str_replace to add it in where you want it.

(Everything is done in the navigation manager now and so there really isn't a way to hook to the sub-nav menu.)

paradoxG(r)eek
03-01-2017, 03:44 PM
You may have to do some sort of str_replace to add it in where you want it.

(Everything is done in the navigation manager now and so there really isn't a way to hook to the sub-nav menu.)

The old good trick from vB3 :) ..... I thought that there is a hook somewhere there that's why I wasted my time searching around. I'll use str_replace.

Thank you Lynne !

--------------- Added 1488390563 at 1488390563 ---------------

Another question. I used at register_form_complete

$human_verify .= $templater->render();

and I was able to add some extra fields in registration form.

Why similar code does not works? Which hookname is the correct to add something in navbar? Now I'm using process_templates_complete

Paul M
03-01-2017, 04:26 PM
You may have to do some sort of str_replace to add it in where you want it.

(Everything is done in the navigation manager now and so there really isn't a way to hook to the sub-nav menu.)
They are ways to hook into the nav manager.
I think there are even some posts about it, if you search.

Links are also stored in the product XML if they are just static.
I havent had to do anything on NavMan for a very long time so I dont remember off the top of my head how you do all of it.

(Some of my products do it, List Reported Items (https://vborg.vbsupport.ru/showthread.php?t=233232) is one).