Solved

Tabs / Layers within SharePoint Wiki page

Posted on 2010-11-16
9
1,130 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 15

Expert Comment

by:dp_expert
ID: 34154307
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
ID: 34155243
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
ID: 34156153
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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:JoMar
ID: 34156166
0
 

Author Comment

by:JoMar
ID: 34164646
Any ideas on this?
0
 
LVL 15

Expert Comment

by:dp_expert
ID: 34167911
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
ID: 34174432
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
ID: 34183914
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
ID: 34186002
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 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