ShUIE MOSS Wiki ToC links go to wiki pages not the right place?

Feb 19, 2010 at 7:47 PM

Hoping that I can get some help here.

My team has installed the newest version of the ShUIE and we are specifically interesting in using the MOSS Wiki ToC feature.  However, when the ToC appears (because of the increased font size or changed font color) with the links for each segment in place, when you click on those ToC links they take you to the listing of wiki pages.... not to the segment in the wiki page.

I find this to be problematic and not the correct function of a wiki ToC.

Has anyone discovered the same problem or do they have any suggestions on trouble shooting?

Thank you.

May 3, 2010 at 12:56 PM

Yes I have found the solution.

There was an Issue with the javascript code. Reinstall the themplate with the following content and you should be fine. Works for me

<?xml version="1.0" encoding="UTF-8"?>
<shuie order="50" active="true">
    <context active="true">
   <javascript minify="true">
  $(".ms-wikicontent div").prepend("<table id=wikiToc />");
    .append("<thead id=wikiTocHead />")
    .append("<tbody />")
  $("#wikiToc tbody").append("<tr />");
  $("#wikiToc tbody tr").append("<td />");
  $("#wikiToc tbody tr td").append("<div id=wikiTocContainer />");
    .append("<ul id=wikiTocBody />");
    .html("<tr><th>Table of Contents</th></tr>");

  var wikiTocId = 0;
  $(".ms-wikicontent font").each(function() {
    var element = $(this);
    if (!$.trim(element.text()))
    element.prepend("<a name='toc" + wikiTocId + "'></a>");
    var liopen = "";
    var liclose = "";
    for (var ii = element.attr("size"); ii < 7; ii++) {
  liopen = liopen + "<ul>";
  liclose = liclose + "</ul>";
     liopen +
     "<li><a class='ms-wikicontent ms-wikilink' href='#toc" + wikiTocId + "'>" +
     element.text() +
     "</a></li>" +
    $("#wikiTocContainer ul")