Logged Out
Create an Account

Forgot your password?
Editing certain menu items...help?

Editing certain menu items...help?
[Back to Index]
Thread Tags
Primary: [Advanced Layout]
Secondary: [Support]

Hey guys,

I've recently been revamping my guild website and have been able to figure out most of the Javascript API until I got stumped on the News page.

What I'm trying to do is call the Calendar & Recruitment menus from my News layout (I don't want them on any of the other pages). I tried every <!--System:__ --> command I could find on the forums but the Firebug output only shows them as comments. I even called the bundled .js pages again but that just invalidated my HTML.

The only way I've been able to get the Calendar to display (I haven't tried the Recruitment menu yet) is by cutting the menu out of the PHP file...and that's just a headache to reformat and there's gotta be an easier way. I know it's a less-than-usual situation, but if you could shed some light, I'd appreciate it!

Geof Frazier
Interesting. (awesome design btw, looking VERY sharp).

The problem you're looking to solve is indeed solvable, though you'll want to use jquery to hide those particular items.

On your layout.html, you'll want to add those two menus manually (<!--System:Menu:Currently Recruiting-->, and <!--System:Menu:Calendar-->), and wrap each of them in a div or span or something to identify those blocks, ie <div class="hide_not_news"><!--System:Menu:Currently Recruiting--></div>.

Then, somewhere near the bottom of the page, you'll want to add something like:

<script type="text/javascript">

The jq_preload() function is a function that calls itself once jquery loaded on the page. Because jquery is loaded near the bottom of the page, it causes a bit of problems trying to call jquery during onload because it's not yet loaded. So wrap what you need in jq_preload()

In any case, that should do it.

It's all in the reflexes.
Thanks for the quick response Chops! That makes things a heckuvalot easier. I'll let you know how it goes when I get back to my workstation. Also, do you already have a noConflict script loaded? I threw one in my layout page yesterday and got an error.
I don't remember if I have a noConflict script installed, but I do use jq() instead of $() specifically to avoid conflicts.

It's all in the reflexes.
Also, I just noticed that I flipped the logic. Right now it will hide that information on the news page, and show for everything else. So use != instead of == if you've already copied the script (I've updated it on the post)

It's all in the reflexes.

[Back to Index]