simplymesobe5280 Posted December 22, 2014 Share Posted December 22, 2014 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 Link to comment Share on other sites More sharing options...
TheSonic Posted December 23, 2014 Share Posted December 23, 2014 Do you own IP.Pages? You can add custom links and other menuitems in the menu manager.... Link to comment Share on other sites More sharing options...
simplymesobe5280 Posted December 23, 2014 Author Share Posted December 23, 2014 No i don´t. On 3.4.7 i simply add the links code to the globalTemplate on the Skinset "Editing Set" part. Link to comment Share on other sites More sharing options...
Andrej Posted December 23, 2014 Share Posted December 23, 2014 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. Link to comment Share on other sites More sharing options...
Farcaster II Posted December 23, 2014 Share Posted December 23, 2014 You can also use following feature to add a Link: ACP => System => General Configuration => "Add a custom link to navigation bar" Link to comment Share on other sites More sharing options...
simplymesobe5280 Posted December 23, 2014 Author Share Posted December 23, 2014 Wow this is cool Many Thanks Daniel and Andrej Link to comment Share on other sites More sharing options...
simplymesobe5280 Posted December 25, 2014 Author Share Posted December 25, 2014 Worked pretty good Andrej Can you tell me how i make the added links open on a new tab Link to comment Share on other sites More sharing options...
Ahmad E. Posted December 25, 2014 Share Posted December 25, 2014 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> Link to comment Share on other sites More sharing options...
simplymesobe5280 Posted December 25, 2014 Author Share Posted December 25, 2014 Many Thanks Ahmad Link to comment Share on other sites More sharing options...
simplymesobe5280 Posted December 26, 2014 Author Share Posted December 26, 2014 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.