Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 22, 201410 yr I want to add custom links to this part On 3.4.7 it was easy. Can someone tell me maybe where i have to add the code here. Many Thanks
December 23, 201410 yr Do you own IP.Pages? You can add custom links and other menuitems in the menu manager....
December 23, 201410 yr Author No i don´t. On 3.4.7 i simply add the links code to the globalTemplate on the Skinset "Editing Set" part.
December 23, 201410 yr Admin CP -> Customization -> Themes -> Edit HTML and CSS -> Navigate to core - front - global - navBar template and add the following code before the </ul> tag at the end: <li data-role='navItem'><a href='http://example.com'>Link A</a></li> Then you need to edit the mobileNavigation template, so the links show in the responsive drawer as well. Find: {{if \IPS\Settings::i()->show_home_link}} <li><a href='{setting="home_url"}'>{lang="home_name_value"}</a></li> {{endif}} Right after add the same code you added to the navBar template. If you wish to only show links for specific user groups, for members who are logged in, etc, you need to use conditional statements. Here is an example: {{if \IPS\Member::loggedIn()->member_id}} <li data-role='navItem'><a href='http://example.com'>Link B</a></li> {{endif}} This link will be hidden from guests.
December 23, 201410 yr You can also use following feature to add a Link: ACP => System => General Configuration => "Add a custom link to navigation bar"
December 25, 201410 yr Author Worked pretty good Andrej Can you tell me how i make the added links open on a new tab
December 25, 201410 yr Worked pretty good Andrej Can you tell me how i make the added links open on a new tab Use <li data-role='navItem'><a href='http://example.com' target='_blank'>Link A</a></li>
December 26, 201410 yr Author On 3.4.7 i added this code to open the Radio link in a popup <script type="text/javascript"> function popup (url) { window = window.open(url, "Popupwindow", "width=696,height=907,resizable=yes"); window.focus(); return false; } </script> <li class='left'><a href='http://www.oursite.com/radio.html' title='Go to Radio'target="_blank" onclick="return popup(this.href)">ARadio</a></li> On 4.0.0. i changed it to <script type="text/javascript"> function popup (url) { window = window.open(url, "Popupwindow", "width=696,height=907,resizable=yes"); window.focus(); return false; } </script> <li data-role='navItem'><a href='http://www.oursite.com/radio.html' target="_blank"onclick="return popup(this.href)">ARadio</a></li> Maybe a hint for those who want to add a popup too
Archived
This topic is now archived and is closed to further replies.