Solved

Tabs / Layers within SharePoint Wiki page

Posted on 2010-11-16
9
1,073 Views
Last Modified: 2012-05-10
I have a site page that I want to add tabbed sections to but for some reason I am not able to get it to save the javascript and css needed to make this happen.  Is there a way to link to js and css files from within a wiki page and how would I go about adding custom code to a wiki page without it overwriting when I save the source?

If you know of an easier way to provide a tabbed user interface for my users I would be interested also.  I have looked at EasyTab but it seems to only work on web part pages and I would rather use wiki pages if possible.  

Below is a link to the script/css I like for now if helps since this is what I would like to use within the page:

http://www.barelyfitz.com/projects/tabber/
0
Comment
Question by:JoMar
  • 5
  • 3
9 Comments
 
LVL 15

Expert Comment

by:dp_expert
Comment Utility
What version of SharePoint you are using? In 2007 you are able to add a web part to a wiki page - simply click on the "Edit page" in the site actions menu. What do you mean by "I;m not able to get it to save"? Where do you input the javascript and CSS? On the wiki content? Did you try using the SharePoint designer?

One thing you need to remember is that changes you do with SPD or browser affect only current Wiki Page, not all pages. Each wiki page has it's own web part page. If you would like to modify all wiki pages you would need to modify the page in the 12 hive.
0
 
LVL 21

Expert Comment

by:chapmanjw
Comment Utility
When you are working with SharePoint Wiki pages, you cannot add JS to the "wiki" content itself.  However, when you are on the Wiki page, instead of hitting Edit to edit the Wiki content, goto Site Actions > Edit Page.  Each Wiki page is actually a web part page.  You can add a Content Editor Web Part to the page and edit the source of the CEWP to add your JS, CSS, and other markup.
0
 

Author Comment

by:JoMar
Comment Utility
We are on SharePoint 2010.  When I added the CEWP did not seem to work but I will try again and verify what I am seeing but seemed that the content really only affected the part and would not show for the other content on the wiki page.  When I edit the source of the wiki page my css or javascript is removed or things like the following are added to it so that it will not function:

.ExternalClassE188A71C513045AABFD0FD5E9F7522B3 H2 {
      PADDING-BOTTOM: 20px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FONT: bold 14px Verdana, Arial, Helvetica, sans-serif; COLOR: #000; PADDING-TOP: 0px
}

The bold section is added to every line of the <style> tag added.  

My main goal is being able to use the code from the below link to provide tabs on the page to divide up some of the content for the users.  I would rather not use web part pages if I dont have to but if that is the only option may not have a choice.  Know I am missing something simple and any help is appreciated.  

0
 

Author Comment

by:JoMar
Comment Utility
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:JoMar
Comment Utility
Any ideas on this?
0
 
LVL 15

Expert Comment

by:dp_expert
Comment Utility
Sharepoint 2010 tends to modify the HTML - adds unique identifiers and so on. I would recommend  using the SharePoint Designer - it'll give you more control.
0
 

Author Comment

by:JoMar
Comment Utility
Unfortunatly when using SPD it does similar to any CSS or JavaScript added within the content area.  My only idea would be having to create a custom master page just for this site even though it does not affect the over all look.
0
 

Author Comment

by:JoMar
Comment Utility
Is there a way to attach css or js files to the page w/out editing the master page?  
0
 
LVL 15

Accepted Solution

by:
dp_expert earned 500 total points
Comment Utility
Hello
Yes - do not add the HTML into a web part - add your code outside the Web Part zones. You can also detach the page from master page and edit entire page content.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now