本文介绍了Sharepoint:如何删除默认的core.css参考?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实不需要从HTML页面中省略默认的core.css引用,但是我想知道,因此我可以完全控制自己.谢谢

I don't have a real need to omit the default core.css reference from my HTML pages but I would like to know so I can feel comfortable that I have full control. Thanks

推荐答案

有很多方法可以实现此目的.

There are many ways to achieve this.

问题是,一旦删除core.css文件,您正在谈论的是6000行的地方,这些地方将不再与演示文稿一起出现.当我们仅限于主题的视觉自定义时该怎么做,我创建了一个主题,该主题将满足任何新的CSS需求,并替换core.css文件中的元素(主题在此文件之后加载,因此如果您在其中重复了声明,这两个文件都将以主题文件为准,而不使用!important微型hacks.)

The problem is, once you remove the core.css file you are talking about 6 thousand lines of places that will not appear with a presentation anymore. What I do when we are limited to theme-only visual customization I create a theme that will address any new CSS needs and also replace the elements in the core.css file (themes are loaded AFTER this file, so if you have duplicated declarations in both files, the theme's one will prevail, without using the !important mini-hacks).

请记住,如果没有此文件,则处于编辑模式的SharePoint不能正常工作,例如,当您谈论具有100%匿名用户的面向Internet的网站而与类似Intranet的网站时,您必须使用不同的方法每个人都可以随时随地创建和编辑内容的门户.

Keep in mind that SharePoint in editing mode just doesn't work without this file, you have to use different approaches when you are, for example, talking about an internet-facing site with 100% anonymous users vs an intranet-like portal with everyone creating and editing content on the go.

在给出所有警告的情况下,您可以转到母版页并删除co​​re.css标记,使其不可见:

With all the warnings given, you can go to your masterpage and remove the core.css tag making it invisible:

<SharePoint:CssLink runat="server" Visible="false"/>

根据共享点网站的类型(WSS与MOSS +发布功能),母版页可能会根据配置而有所不同,默认情况下(没有发布功能或任何更改的WSS或MOSS),您的母版页将在所有网址中不包含/_layouts/的链接.

Depending on your type of sharepoint site (WSS vs MOSS + Publishing Features) the masterpages may work differently based on configuration, by default (WSS or MOSS without Publishing Features or any change on the matter) your masterpage will open on all the link that do not contain /_layouts/ in the url.

示例:

  • /Default.aspx =>母版页
  • /DocumentLibrary/Forms/Allitems.aspx => MasterPage
  • /_ layouts/viewlsts.aspx(显示所有网站内容)=>没有自定义母版

这是Microsoft阻止您用母版页破坏更多内容(系统页)的方法,但是您可以极端使用HttpModules或编辑12/Template/Layouts/LCID文件夹(影响整个Web前端)

This is Microsoft's way to stop you from breaking even more (system pages) with the masterpages, but you can be extreme and use HttpModules or editing the 12/Template/Layouts/LCID folder (affecting the entire web front-end)

常用方案:

  • 用户匿名时没有core.css的匿名站点,并且在提供凭据时正常加载(加载速度)
  • 用于让用户创建其迷你网站并使用品牌模板或其他共享点主题的主题
  • 母版页可自定义大多数用户通常看到的内容,从而迫使您在子网站中进行品牌宣传(非MOSS Publishing中的新网站将不会继承该母版页)
  • 所有带有HttpModules或/12/修改的母版页(非常细腻且复杂)

这篇关于Sharepoint:如何删除默认的core.css参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 21:16