solved Adding a topnav link to Blog - malformed HTML

Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
I added a link to Events to the top nav using the following:

* Add Events Menu *}
{if jrCore_module_is_active('jrEvent')}
     <li{if isset($_post.module) && $_post.module == 'jrEvent'} class="menu_active"{/if}><a href="{$jamroom_url}/{jrCore_module_url module="jrEvent"}">{jrCore_lang skin=$_conf.jrCore_active_skin id="28" default="Events"}</a></li>
{/if}

To do the same for Blogs I am assuming just replace every instance of jrEvent with jrBlog. But - what's the skin id for blog? Is there a canonical list of these somewhere? I searched for jrCore_active_skin in the documentation and didn't find the answer I was looking for.

And just because it's bugging me ... how come the opening <li isn't closed? I took a look at all the menu items within the Site Builder if statement and none of them are closed. Where's the closing >?
updated by @claygordon: 02/06/15 09:49:48AM
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
The closing > is right at the end of: class = "menu_active" { /if } >
(Are you missing an opening bracket right at the beginning, before the asterisk?)

The id=number is going to be found in your language string tabs for a particular module.
Go to your active skin and the language tab- id=28 says "Events".
To do the same for Blogs look in the same language list and you'll see line 42 says "Blog".
I changed my Blogs top link to read id=42, and I also changed in the language list "Blog" to "Blogs" instead, and saved the changed.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Clay Gordon
Clay Gordon
@claygordon
10 years ago
744 posts
Exactly what was needed, thanks!

The leading { is missing because of a bad cut and paste.
updated by @claygordon: 01/05/15 08:44:21PM
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
But the id= is only for the sake of if you want your site translating into other languages- it's not actually an essential part for the link.
In case you want to try a simplified non-multilanguage link, here is what my two top nav links are currently like in my skin headermenudesktop template:
(sorry the paragraph formatting got messed up when saving to a jpg)
These two links are working fine for me.
if-jrCore.jpg
if-jrCore.jpg  •  136KB




--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/05/15 08:54:31PM
Strumelia
Strumelia
@strumelia
10 years ago
3,603 posts
OK this marks the first time in my life I ever gave anyone coding help other than a little antique html. lololol Mark your calendars! ;D

P.S. I just now ate some chocolate as my reward.





--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 01/05/15 08:58:03PM
brian
@brian
10 years ago
10,148 posts
Thanks @Strumelia for the help - that's awesome :)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags