-

how to set tab menu blog link active?

Support for phpBB3, phpBB3 Modifications, and phpBB3 styles
Forum rules
Bugs go in the Bug Tracker

how to set tab menu blog link active?

Postby testser » Fri Aug 05, 2011 4:37 am

I have a custom menu in my overall_header.html. the link in the custom menu for the blog works fine but it is not set active when clicking on it. instead the forum tab is active. all other tabs work fine. how can this be fixed?
this is the code I use in the overall_header.html:

Code: Select all
<!-- ELSEIF S_GALLERY_SEARCH_DFB -->
   <!-- DEFINE $ACTIVETAB = 'gallery' -->
<!-- ELSEIF S_GALLERY_MCP_DFB -->
   <!-- DEFINE $ACTIVETAB = 'gallery' -->   
<!-- ELSEIF SCRIPT_NAME == 'blogs' -->
   <!-- DEFINE $ACTIVETAB = 'blogs' -->
<!-- ELSEIF SCRIPT_NAME == 'portal' -->
   <!-- DEFINE $ACTIVETAB = 'portal' -->
<!-- ELSE -->
   <!-- DEFINE $ACTIVETAB = 'forum' -->
<!-- ENDIF -->         
         <ul>
            <li<!-- IF $ACTIVETAB == 'portal' --> class="activetab"<!-- ENDIF -->><a href="{U_PORTAL}"><span>{L_PORTAL}</span></a></li>
            <li<!-- IF $ACTIVETAB == 'forum' --> class="activetab"<!-- ENDIF -->><a href="{U_INDEX}"><span>{L_FORUM}</span></a></li>
                <li<!-- IF $ACTIVETAB == 'blogs' --> class="activetab"<!-- ENDIF -->><a href="{U_BLOG}"><span>Blogs</span></a></li>
            <li<!-- IF $ACTIVETAB == 'gallery' --> class="activetab"<!-- ENDIF -->><a href="{U_GALLERY_MOD}"><span>{L_GALLERY}</span></a></li>            
 


thanks
testser
Donor
Donor
 
Posts: 2
Joined: Fri Jul 09, 2010 12:37 am
Blog: View Blog (0)

Re: how to set tab menu blog link active?

Postby EXreaction » Fri Aug 05, 2011 8:51 am

About the only variable I see that is outputted on all blog pages is the BLOG_CREDITS variable, so you could try
<!-- IF BLOG_CREDITS -->
Grateful for the mods I've built? Then donate!
User avatar
EXreaction
Site Owner
Site Owner
 
Posts: 4988
Joined: Wed Jun 28, 2006 5:08 pm
Blog: View Blog (53)

Re: how to set tab menu blog link active?

Postby testser » Wed Aug 10, 2011 3:06 pm

Thanks for your reply, but that didn´t work. I used <!-- IF $SCRIPT_NAME--> instead and that works fine.
testser
Donor
Donor
 
Posts: 2
Joined: Fri Jul 09, 2010 12:37 am
Blog: View Blog (0)


Return to phpBB3 Support



Who is online

Users browsing this forum: cvghjqr2, oewjet437 and 5 guests