Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

jpwv

Member
  • Content Count

    77
  • Joined

  • Last visited

  • Days Won

    1
  1. To have a folder in the navigation header link directly to a page: First you have to have a page to link to the Not Linked section of your page list. Then you can use the Header code injection. (Home)/ Settings/ Advanced/Code Injection/Header ... paste HTML code. <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script> $(function() { $('.main-nav li a').each(function () { if ($(this).text() == 'Folder1') { $(this).attr('href','http://www.hsustudios.com/page1'); $(this).attr('onclick','true'); } if ($(this).text() == 'Folder2') { $(this).attr('href','http://www.hsustudios.com/page2'); $(this).attr('onclick','true'); } }); }); </script> <!-- note --> for adding invisible notes in html This worked for me in Ishimoto.
  2. Not sure. I did not use the search in header on my website, so I did not investigate it further.It's possible that this code worked for earlier SqSp version. @arthurm above seems to be suggesting adding a search page to your header navigation menu with some added trickery. Or you could just have a page with the search function by itself? Not elegant, but functional.
  3. Not sure. I did not use the search in header on my website, so I did not investigate it further.It's possible that this code worked for earlier SqSp version. @arthurm above seems to be suggesting adding a search page to your header navigation menu with some added trickery. Or you could just have a page with the search function by itself? Not elegant, but functional.
  4. I tried this code and it did put a search block in header. I did not play with trying to position it. Instead I put the search block in footer. Just normal editing to place it there. However, I did make my ishimoto footer full width. <div id="search-wrapper" data-kbjs-widget="search-widget" data-autocomplete="true" data-search-id="nav-search"> <form action="/search-results"> <button type="button" id="search-button"></button> <input type="text" id="nav-search-box" name="q" placeholder="Search"> <p class="search-instructions hidden">Press enter</p> </form>
  5. Be sure you copy the code exactly and do not delete any of the ' marks when you copy your links into it. I suggest making the changes in a text editing window and pasting that into the Header Code Injector. Be sure you are not working on a single page, but the whole site.
  6. No experience with Dovetail. All I can think of is to be sure you are putting this into the HEADER INJECTOR, not the CSS injector. Be sure you capitalize your folder name in exactly the same way you use it in the header. Also be sure the target URL is exactly correct as well.
  7. This code is incomplete. See later post below beginning with Last Try.This snippet will add folders to the list if you insert it in the right place. See below as well.
  8. This goes between the last single } and the following line }); I hope this is clear now.
  9. if ($(this).text() == 'FolderName') { $(this).attr('href','http://www.TargetWebPage'); $(this).attr('onclick','true'); }
  10. OK. Finally. This is what you paste into the Header Code Injector. Replace FolderName and TargetWebPage with your info. The first line with the < ... > is only a note and will not affect coding if deleted. You can add more folder actions by adding the following code after the last single } .
  11. Last try: <!-- makes navigation folder a clickable link --> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script> $(function() { $('.main-nav li a').each(function () { if ($(this).text() == 'FolderName') { $(this).attr('href','http://www.TargetWebPage'); $(this).attr('onclick','true'); } }); }); </script>
  12. Here is a repost of the code. This bloggish site takes out returns... See the post that begins with Last try....
  13. Paste in code from below. Replacing FolderName with your folder, and TargetWebPage with the page you want the link to open.
×
×
  • Create New...