<pre class="script"> var siteLogoImageSrc = wiki.cdn('/@cc/blackboard-help/skin/images/logo-blackboard.png'); // If we are on the hompage, let's correct to the landing page var changeTitle = false; var currentPage = page; if(currentPage.id == site.homepage.id) { var landingPagePath = __env.defaultLandingPage ?? '/'; var landingPage = wiki.getpage(landingPagePath); if(#landingPage &gt; 0) { currentPage = landingPage; changeTitle = true; } } var searchOrigin = __request.args.returnpath ?? 'Home'; var siteUri = site.uri; var pageIsRTL = string.contains('/' .. currentPage.path, '/ar-sa/'); var parents = currentPage.parents; var ns = currentPage.namespace; if (ns === &quot;&quot;) { var parents = currentPage.parents; } else { var parents = site.homepage; } &lt;div class=&quot;bb-header-top&quot;&gt; &lt;ul class=&quot;bb-logo&quot;&gt; &lt;li&gt; &lt;a rel=&quot;internal&quot; href=&quot;/&quot; title=&quot;Blackboard Help&quot;&gt; &lt;img src=(siteLogoImageSrc) alt=&quot;Blackboard Help&quot; /&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt;&quot;The Official Blackboard Help Site&quot;;&lt;/li&gt; &lt;/ul&gt; &lt;ul class=&quot;bb-secondary-nav&quot;&gt; &lt;li class=&quot;first&quot;&gt;&lt;a href=&quot;http://discussions.blackboard.com/&quot; title=&quot;Ask the MVPs&quot;&gt;&quot;Ask the MVPs&quot;;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;https://behind.blackboard.com/&quot; title=&quot;Behind the Blackboard&quot;&gt;&quot;Behind the Blackboard&quot;;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;http://www.blackboard.com/&quot; title=&quot;Blackboard Inc.&quot;&gt;&quot;Blackboard Inc.&quot;;&lt;/a&gt;&lt;/li&gt; if (user.anonymous) { &lt;li&gt;&lt;a title=&quot;Sign In&quot; href=&quot;/index.php?title=Special:Userlogin&amp;amp;returntotitle=&quot;&gt;&quot;Sign In&quot;;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a title=&quot;Create an Account&quot; href=&quot;/Special:UserRegistration&quot;&gt;&quot;Contribute&quot;;&lt;/a&gt;&lt;/li&gt; } else { &lt;li&gt;&lt;a title=&quot;Sign out&quot; href=&quot;/Special:Userlogout&quot;&gt;&quot;Sign out&quot;;&lt;/a&gt;&lt;/li&gt; } // Languages dropdown var languages = __env.topNavLanguages ?? { }; if(#languages) { &lt;li class=&quot;bb-language-menu last&quot;&gt; &lt;span&gt; var languageTitle = map.contains(languages, parents[1].name ?? '') ? parents[1].title : languageLabel; &lt;a class=&quot;drop-link&quot; href=&quot;#&quot; title=&quot;Language selector&quot;&gt;languageTitle;&lt;/a&gt; &lt;ul class=&quot;dropdown&quot;&gt; foreach(var languagePage in site.homepage.subpages) { if(map.contains(languages, languagePage.name)) { var selected = (parents[1].name ?? nil) == languagePage.name ? 'mt-list-selected' : ''; &lt;li class=(selected)&gt; var link = site.uri &amp; languagePage.name; if(languages[languagePage.name].defaultProduct) { link = link &amp; uri.encode(languages[languagePage.name].defaultProduct); if(languages[languagePage.name].defaultVersion) { link = link &amp; uri.encode(languages[languagePage.name].defaultVersion); if(languages[languagePage.name].defaultRole) { link = link &amp; uri.encode(languages[languagePage.name].defaultRole); } } } &lt;a rel=&quot;custom nofollow&quot; title=(languagePage.title) href=(link)&gt;languagePage.title&lt;/a&gt; &lt;/&gt; } } &lt;/&gt; &lt;/span&gt; &lt;/li&gt; } &lt;/ul&gt; &lt;/div&gt; &lt;div class=&quot;bb-header-bottom&quot;&gt; &lt;div class=&quot;bb-header-focus&quot;&gt;&lt;/div&gt; &lt;div class=&quot;bb-search-form&quot;&gt; var currentProductPage = parents[2] ?? nil; var noversion = currentProductPage &amp;&amp; topNavProducts[currentProductPage.name] &amp;&amp; topNavProducts[currentProductPage.name].noversion === true; var searchPage = (noversion ? nil : parents[4]) ?? parents[3] ?? parents[2] ?? parents[1] ?? site.homepage; var searchPath = string.join([ uri.encode(segment.name) foreach var segment in searchPage.parents ], '/'); template('MindTouch/Controls/SearchWidget', {showfilter: false, redirecttosearch : true, path: searchPath}); &lt;/div&gt; &lt;div class=&quot;bb-product-nav&quot;&gt; &lt;ul&gt; if (ns === &quot;Template&quot; || ns === &quot;Special&quot; || !__env.topNavLanguages) { &lt;li class=&quot;bb-special-template&quot;&gt; &lt;span&gt; &lt;a class=&quot;drop-link&quot; href=&quot;#&quot;&gt;page.title;&lt;/a&gt; &lt;/span&gt; &lt;/li&gt; } else { var currentLanguage = parents[1].name ?? topNavDefaultLanguage; var currentRole = parents[4].name ?? nil; // Product dropdown if((map.contains(topNavProducts, currentProductPage.name ?? '') || map.contains(topNavLanguages, parents[1].name ?? ''))) { &lt;li class=&quot;bb-product-menu first&quot;&gt; &lt;span&gt; var productTitle = currentProductPage.title ?? productLabel; &lt;a class=&quot;drop-link&quot; href=&quot;#&quot;&gt;productTitle;&lt;/a&gt; &lt;ul class=&quot;dropdown&quot;&gt; foreach(var productPage in parents[1].subpages) { if(map.contains(topNavProducts, productPage.name)) { var selected = (currentProductPage.name ?? nil) == productPage.name ? 'mt-list-selected' : ''; &lt;li class=(selected)&gt; var link = site.uri &amp; currentLanguage &amp; uri.encode(productPage.name) &amp; uri.encode(topNavProducts[productPage.name].defaultVersion ?? '') &amp; uri.encode(currentRole ?? topNavProducts[productPage.name].defaultRole ?? ''); &lt;a title=(currentProductPage.title) rel=&quot;custom nofollow&quot; href=(link)&gt;productPage.title&lt;/a&gt; &lt;/&gt; } } &lt;/&gt; &lt;/span&gt; &lt;/li&gt; } // Version dropdown var versionPages = currentProductPage.subpages; if (!noversion &amp;&amp; versionPages &amp;&amp; #versionPages &amp;&amp; map.contains(topNavProducts, currentProductPage.name)) { &lt;li class=&quot;bb-version-menu&quot;&gt; &lt;span&gt; var versionTitle = parents[3].title ?? versionLabel; &lt;a class=&quot;drop-link&quot; href=&quot;#&quot;&gt;versionTitle;&lt;/a&gt; &lt;ul class=&quot;dropdown&quot;&gt; foreach(var versionPage in versionPages) { var selected = (parents[3].name ?? nil) == versionPage.name ? 'mt-list-selected' : ''; &lt;li class=(selected)&gt; var link = site.uri &amp; currentLanguage &amp; currentProductPage.name &amp; versionPage.name &amp; uri.encode(currentRole ?? topNavProducts[currentProductPage.name].defaultRole ?? ''); &lt;a title=(versionPage.title) rel=&quot;custom nofollow&quot; href=(link)&gt;versionPage.title&lt;/a&gt; &lt;/&gt; } &lt;/&gt; &lt;/span&gt; &lt;/li&gt; } var roleLevel = noversion ? 2 : 3; if (parents[roleLevel] &amp;&amp; map.contains(topNavProducts, currentProductPage.name)) { var subpages = parents[roleLevel].subpages; if(#subpages) { &lt;li class=&quot;bb-role-menu last&quot;&gt; &lt;span&gt; var roleTitle = parents[roleLevel+1].title ?? roleLabel; &lt;a class=&quot;drop-link&quot; href=&quot;#&quot;&gt;roleTitle;&lt;/a&gt; template(&quot;MindTouch/Controls/ListPages&quot;, { pages: subpages, sort: 'title', style: 'bullets', selected: page.title }); &lt;/span&gt; &lt;/li&gt; } } } &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt;</pre> <pre class="script-jem"> $(function() { if ({{ pageIsRTL }}) { $('#page-top, #title, .bb-site-history').addClass('bb-rtl'); } $('.bb-language-menu, .bb-product-menu, .bb-version-menu, .bb-role-menu').find('ul').addClass('dropdown'); if({{ changeTitle }}) { $('.title').replaceWith('&lt;span class=&quot;title&quot;&gt;' + {{ currentPage.title }} + '&lt;/span&gt;'); } if({{ page.path }} === 'Special:Search'){ var siteUri = {{ siteUri }}; var searchOrigin = {{ searchOrigin }}; if(searchOrigin === 'Home') { searchOrigin = ''; } if($('#mt-search-origin').length &lt;= 0) { $('#deki-advanced-toggle').before('&lt;br/&gt;&lt;a href=&quot;' + siteUri + searchOrigin + '&quot;id=&quot;mt-search-origin&quot;&gt;Go Back&lt;/a&gt;'); } } }); $(function() { $('dl').find('dt').on('click', function() { $(this).next().toggle('350'); }); }); </pre> <pre class="script-css"> li .mt-list-selected { font-weight: bold; } #mt-search-origin { float: left; } dt { color: #009999; cursor: pointer; } dd { display: none; } </pre> <pre class="script"> &lt;html&gt; &lt;head&gt; &lt;meta name=&quot;google-site-verification&quot; content=&quot;W3wChhYoMMYhQ2oN9vxn4zfHw1k1oZFMp-MAik1X7BI&quot; /&gt; &lt;/head&gt; &lt;/html&gt; </pre>
<pre class="script"> // If we are on the hompage, let's correct to the landing page var changeTitle = false; var currentPage = page; if(currentPage.id == site.homepage.id) { var landingPagePath = __env.defaultLandingPage ?? '/'; var landingPage = wiki.getpage(landingPagePath); if(#landingPage &gt; 0) { currentPage = landingPage; changeTitle = true; } } var parents = currentPage.parents; var ns = currentPage.namespace; var hasNav = true; var topLevelPage = site.homepage.path; var pagePath = currentPage.path; if(ns == '') { if(parents[3] &amp;&amp; map.contains(topNavProducts, parents[2].name)) { if(parents[4]) { var ind = 4; topLevelPage = parents[4].path; } else { var ind = 3; topLevelPage = parents[3].path; } pagePath = string.join([ parent.name foreach var parent in parents where __index &gt; ind ], '/'); } } else { if(pagePath == 'Special:ListTemplates' || pagePath == 'Special:Search' || pagePath == 'Special:PrintBook') { hasNav = false; return; } if(ns === 'Template') { topLevelPage = ns .. ':'; } else if(ns == 'Special' || ns == 'User') { topLevelPage = parents[0].path; pagePath = string.substr(pagePath, string.indexof(pagePath, '/') + 1); } } if (parents[3] || (ns === &quot;Special&quot;) || (ns === &quot;Template&quot;) || (ns === &quot;User&quot;) || page.id == site.homepage.id) { &lt;div class=&quot;bb-column-left&quot;&gt; &lt;a href=(site.uri)&gt; &lt;img src=&quot;/@cc/blackboard-help/skin/images/blackboard-help.png&quot; alt=&quot;Blackboard Help&quot; /&gt; &lt;/a&gt; &lt;div class=&quot;bb-left-h2-container&quot;&gt; &lt;h2&gt;&quot;Table of Contents&quot;;&lt;/h2&gt; &lt;/div&gt; &lt;div class=&quot;bb-left-site-nav&quot;&gt;&lt;/div&gt; &lt;/div&gt; } else { hasNav = false; } </pre> <pre class="script-jem"> (function($) { Deki.provide('Deki.BlackBoard.Nav'); _.extend(Deki.BlackBoard.Nav, { setTabIndex: function(node) { allNodes = $('a.dynatree-title'); var currentNodeIndex = allNodes.index($(node.li).find('a.dynatree-title')); for(var i = currentNodeIndex + 1; i &lt; allNodes.length; i++) { $(allNodes[i]).attr('tabindex', i - currentNodeIndex + 1); } } }); $(function() { if({{ hasNav }}) { Deki.Ui.TreeHelper.createTree($('.bb-left-site-nav'), { dekiroot: {{ uri.encode(topLevelPage) }}, onActivate: function(node) { if (node.data.idKey &amp;&amp; node.data.idKey != {{ currentPage.id }} ) { window.open(node.data.href, '_self'); return; } if(node.data.isFolder) { node.expand(); } // Leaving in case Blackboard wants to enable again // Scroll to active node //var allNodes = $('.dynatree-container li'); //var currentNodeIndex = allNodes.index($(node.li)); //$('.dynatree-container').scrollTop(20 * currentNodeIndex); // Set the tab index setTimeout(Deki.BlackBoard.Nav.setTabIndex(node), 300); } }, function() { Deki.Ui.TreeHelper.loadPath({{ pagePath }}); }); } else { $('.bb-column-center').addClass('bb-content-full'); } }); })(jQuery); </pre>
Blackboard ยป

Blackboard

Last Modified
13:04, 22 Aug 2014
Table of Contents
<pre class="script"> if(__env.defaultLandingPage &amp;&amp; defaultLandingPage != site.hompage.path) { wiki.page(defaultLandingPage); }</pre>
Back to Top
Was this article helpful?
Powered by
Powered by MindTouch®