Invalid SQL: REPLACE INTO `swsessions` (`sessionid`, `ipaddress`, `lastactivity`, `useragent`, `isloggedin`, `sessiontype`, `typeid`, `dateline`, `status`) VALUES('4u5wpbaw5m1uabdmgstdfbg5tteksbi8', '', '1716614594', 'CCBot/2.0 (', '0', '40', '0', '1716614594', '0'); (The table 'swsessions' is full) Creating a Persistent Membership Menu - Powered By Kayako eSupport
24 May 2024 
Support Center » Knowledgebase » Technical FAQs » HTML/CSS Tips » Creating a Persistent Membership Menu
 Creating a Persistent Membership Menu
Solution Creating a Persistent Membership Menu  (difficulty : Intermediate)

Simply put, a persistent menu is a menu where the CSS and HTML code only have to be edited in one spot to achieve global changes.

This is handy when you are constructing a large membership with many episodes, and need a menu system that you can modify without having to tediously make the changes in each episode.

Below are the steps required:

  1. Add: var theElement = document.getElementById('ElementForMenuToBeInsertedInto'); into your "advanced membership customization" box in Nanacast. Replace "ElementForMenuToBeInsertedInto" with the ID of the element where the menu will be. (i,e header). MAKE SURE ALL SCRIPT IS WRITTEN WITHIN <script></script> TAGS.
  2. Add: var myMenu = "<div id='myMenu'>" + "<a href=''>" +"Item1" + "</a>" + "<a href=''>" +"Item2" + "</a>" +  "<a href=''>" +"Item3" + "</a>" + "<a href=''>" +"Item4" + "</a>" + "</div>";  into the same location as above. To Change and Add menu items, copy and paste additional lines of: +  "<a href=''>" +"Item3" + "</a>" + Make sure each separate tag is contained within double quotes as well as a plus symbol. Change the hyperlink reference "href" to whichever URL you are going to use per menu item.
  3. In EACH MEMBERSHIP, add this line: theElement.innerHTML = myMenu;  between script tags. This will fundamentally inject the HTML in contained within the myMenu variable into the designated element. 

 Now you can access your menu from within the "advanced membership customization".  Just add <style> </style> tags and access your new menu by its id. (#myMenu{} in this example)
Access the menu items separately by writing: #myMenu li{}

Your final code should look like this:

var theBod = document.getElementById('header');
var myMenu = "<div id='myMenu'>" + "<a href=''>" +"Item1" + "</a>" + "<a href=''>" +"Item2" + "</a>" +  "<a href=''>" +"Item3" + "</a>" + "<a href=''>" +"Item4" + "</a>" + "</div>";
#myMenu a{

and in each episode:
theBod.innerHTML = myMenu;

Article Details
Article ID: 231
Created On: 22 Nov 2011 04:15 PM

 This answer was helpful  This answer was not helpful

 Login [Lost Password] 
Remember Me:
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | News

Help Desk Software By Kayako eSupport v3.60.04