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
Solved

Tabs / Layers within SharePoint Wiki page

Posted on 2010-11-16
9
1,117 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
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-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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