Custom Menu Bars, Table of Contents, and Importing blocks of HTML Tutorial
I’ve been trying to get some really complicated bits of code to work lately, and I’ve come up with a nice alternative to have a “second” sidebar, custom menu bar, and Index which I hope can help you out. It’s a bit complicated, but there’s nothing here that’s hard as long as you know how to edit a wiki page! For the moment, I’m using this method to keep a Sortable-Hierarchal-Table of Contents within my site...see http://magicwiki.pbwiki.com for more and scroll to the bottom, that table is stored in an external file and not inside the page at all!
OK, the first thing you’ll need to do is create a “HTML/JavaScript Plugin” wherever you want the block of external Javascript or HTML to go. Then check the box that says “Allow Javascript code...” and paste the following:
<*script type="text/javascript" src="/f/NAMEOFFILE.js">
Removing the * and changing NAMEOFFILE to the name of your file, which must always be a javascript file (even if you only are using a block of HTML, more on that in a bit). If you only wish to reuse a block of HTML, then it’s simple, just upload your Javascript file and your done. If however you want to reuse a piece of HTML or HTML and JavaScript mix, then read on.
The first thing you’ll need to do is create the block of HTML. You can do this by creating a temporary page in your PBWiki, and using the editor to create whatever it is you will be reusing as you want it to appear (Menu, Table of Contents, News Announcements, etc) in your pages. Then go into Source Mode, and copy/paste all the code into this link http://accessify.com/tools-and-wizard... , making sure to uncheck the “Include
OK, the first thing you’ll need to do is create a “HTML/JavaScript Plugin” wherever you want the block of external Javascript or HTML to go. Then check the box that says “Allow Javascript code...” and paste the following:
<*script type="text/javascript" src="/f/NAMEOFFILE.js">
Removing the * and changing NAMEOFFILE to the name of your file, which must always be a javascript file (even if you only are using a block of HTML, more on that in a bit). If you only wish to reuse a block of HTML, then it’s simple, just upload your Javascript file and your done. If however you want to reuse a piece of HTML or HTML and JavaScript mix, then read on.
The first thing you’ll need to do is create the block of HTML. You can do this by creating a temporary page in your PBWiki, and using the editor to create whatever it is you will be reusing as you want it to appear (Menu, Table of Contents, News Announcements, etc) in your pages. Then go into Source Mode, and copy/paste all the code into this link http://accessify.com/tools-and-wizard... , making sure to uncheck the “Include
1
person likes this idea
I like this idea!
Tell me when this idea gets some attention.
The more people who like this idea, the more it gets noticed.
The more people who like this idea, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?’ve been trying to get some really complicated bits of code to work lately, and I’ve come up with a nice alternative to have a “second” sidebar, custom menu bar, and Index which I hope can help you out. It’s a bit complicated, but there’s nothing here that’s hard as long as you know how to edit a wiki page! For the moment, I’m using this method to keep a Sortable-Hierarchal-Table of Contents within my site...see http://magicwiki.pbwiki.com for more and scroll to the bottom, that table is stored in an external file and not inside the page at all!
OK, the first thing you’ll need to do is create a “HTML/JavaScript Plugin” wherever you want the block of external Javascript or HTML to go. Then check the box that says “Allow Javascript code...” and paste the following:
<*script type="text/javascript" src="/f/NAMEOFFILE.js">
Removing the * and changing NAMEOFFILE to the name of your file, which must always be a javascript file (even if you only are using a block of HTML, more on that in a bit). If you only wish to reuse a block of HTML, then it’s simple, just upload your Javascript file and your done. If however you want to reuse a piece of HTML or HTML and JavaScript mix, then read on.
The first thing you’ll need to do is create the block of HTML. You can do this by creating a temporary page in your PBWiki, and using the editor to create whatever it is you will be reusing as you want it to appear (Menu, Table of Contents, News Announcements, etc) in your pages. Then go into Source Mode, and copy/paste all the code into this link http://accessify.com/tools-and-wizard... , making sure to uncheck the “Include <*script> tags”. Click the “Convert to JavaScript” button.
Now, open up Notepad, and copy paste the code you got. Save it as NAMEOFFILE.js and upload it to your wiki. Now all you have to do is place a “HTML/JavaScript Plugin” like above in all the pages you want the block of HTML to go. If you need to make changes, you only have to change the NAMEOFFILE.js and not all of the individual pages!
It’s complicated I know, but it’s an excellent alternative if you need to call an external bit of code or HTML, especially if it’s something you edit often (like a Table of Contents) or need throughout many pages (like a Menu Bar). If you don’t understand something or can’t get it to work right let me know. Like I said, I’ve got a rather complicated Table of Contents going, but all I need to do is edit the .js file and all my pages (or the ones I’ll have in the future) are all automatically updated.
I’m excited
-
Inappropriate?Hi Carlos,
Thanks for sharing that very good resource. Do you have any others?
I found one recently here:
http://www.textfixer.com/
Clif
-
Inappropriate?TextFixer is an excellent source, I've referenced it several times. A couple of others I use are:
http://www.echoecho.com/tools.htm
http://www.dynamicdrive.com/
http://www.colorschemer.com/online.html - I recommend this if you use custom colors. It's based on the color wheel which is taught in Art Theory which automatically set's up the colors you should use for your layout.
-
Super. I love online tools.
Loading Profile...


