Tag Info

Hot answers tagged

11

I came across this link by Josh Gaffey that describes how to set the welcome page for a publishing site. The code I used is: ... // Create publishing page if (bPageCreated) { using (SPSite site = new SPSite(p_sSubSiteUrl)) { using (SPWeb web = site.OpenWeb()) { PublishingWeb publishingWeb = null; if ...


9

You can't, it isn't supported, http://support.microsoft.com/kb/2492356.


8

I have to disagree with James. The SPContentType in SharePoint 2010 has a new constructor that lets you specify the content type id. The addition of the Inherits attribute of the ContentType element makes the behavior of content types described in CAML inconsistent. Finally, the Feature upgrade mechanism is great if you are adding fields but it doesn't ...


6

Just a try : replace the Lookup Column definition with this one : <Field ID="{2FF1B484-6D70-449c-8E5C-904E4D5971E1}" Name="PageCategory" Group="Intranet Columns" Type="Lookup" DisplayName="PageCategory" List="Lists/Categories" ShowField="Title" PrependId="TRUE" Overwrite="TRUE" /> Doesn't know why, ...


6

The type of pages available by default (wiki vs. article and web part pages) is the primary difference. Since wiki pages in 2010 allow for web parts to be inserted, many people are now choosing enterprise wiki sites over publishing sites. The only big thing you lose with wiki sites over publishing sites are page layout templates. Wikis have some basic ...


5

Could you tell a bit more on what part of the object model you are using? If you are coding navigation api, theres other better approaches with the whole sitemap provider framework (like PortalSiteMapProvider). If you just want the current information in general, you can always use SPContext.Current to get hold of data like current web, site, list, ...


5

Since you are using a Data View you have the ability to modify the underlying XSLT. Go to the web part's properties and grab the source. Edit it in notepad or more friendly like VS.NET. In this case, you just want to remove the TH row.


5

In code, sites are represented by the class SPWeb and site collections are represented by SPSite. People, mainly developers, sometimes refer to sites as webs as a result of this.


5

D'oh! turns out setting the debug="false" value in the system.web section removes the .debug.js files from the client download... <compilation batch="false" debug="false" optimizeCompilations="true">


5

In the most concise terms I can think of - a Page Layout is used to display content, a Master Page governs the look and feel for the whole site. A Page Layout has an associated content type, therefore it stores content, and a page derived from a Page Layout will store the content in the content type's fields. A MasterPage does not have a content type and ...


5

try to use this query: SPQuery q = new SPQuery(); q.ViewAttributes = "Scope=\"Recursive\"" q.Query = "<Where><Geq><FieldRef Name='CheckoutUser' LookupId='TRUE'/><Value Type='int'>0</Value></Geq></Where>"; var pages = pagesList.GetItems(q);


5

To add what John said, Publishing sites are better when you are doing a .COM public facing site, when you need more publishing controls, more control over who can author, edit & publish, and when you want to enforce a specific look & feel & brand.


5

I know exactly what you're looking for. While a debate about proper link tag usage and CSS storage folders is always a fun topic, realize none of that is your issue here. There are two components that allows you to add <link> tags to Page Layouts. First, you need to find the following lines of code in the head of the Page Layout's HTML page: ...


5

How to activate feature via Managed Client Object Model: public void ActivateFeature(string webFullUrl,Guid featureId,bool force,FeatureDefinitionScope featdefScope) { using (var ctx = new ClientContext(webFullUrl)) { var features = ctx.Web.Features; ctx.Load(features); ctx.ExecuteQuery(); features.Add(featureId, force, ...


5

Yes there are four List Event Receivers: ListAdding(SPListEventProperties) ListAdded(SPListEventProperties) ListDeleting(SPListEventProperties) ListDeleted(SPListEventProperties) You may be interested in first two. See here for more info: http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.splisteventreceiver.listadding(v=office.14).aspx ...


4

Master Page is where you need to place these items, because it defines the look and feel that all the pages in the site gets and by placing that you will have the changes reflected in all the pages of the site. Register Tag has to be placed at the top of the Master page where you see other register tags. And the second set of code needs to be in the bottom ...


4

Here are the options for workflows in SharePoint 2007: Out-of-the-box. These are described at Office Online. They are limited in options but require no additional tools. SharePoint Designer. These are a lot more flexible and created using a wizard interface within SPD. Here's a video tutorial, and MSDN reference, you can search for many more resources. ...


4

Well, it sounds like you are using the publishing features of MOSS. With the publishing features you have a page layout that is applied to a page. You will not be able to edit this page directly except through the UI by adding webparts or changing values in the field controls. When you try to edit a page that is using a page layout in SP Designer, it will ...


4

Publishing portal is typically used for web content management (internet sites), Collaboration portal is typically used for intranets. Publishing portals contains but a subset of the lists, libraries and subsite templates types you find in Collaboration portal site definition template. Collaboration templates on the other hand contains the lot! You got ...


4

The Communitiy Kit for SharePoint changes the master page dynamically. You can find a code sample in the latest CKS changset. Drill down to EBE -> CKS.EBE -> CKS.Blog. It is in the BlogHttpModule.cs in the BlogHttpModule_PreInit method. You will need to add the HttpModule to the web.config. For an example of that, check the WebAppFeatureReceiver.cs in the ...


4

If you place a FieldValue control on a Page Layout you can set this to display the value of a custom column using the FieldName property. For example: <SharePointWebControls:FieldValue FieldName="CustomFieldName" runat="server"/> Note you will need a reference to Microsoft.SharePoint.WebControls at the top of the page before this will work e.g. ...


4

There are (at least) three ways of achieving this in SharePoint 2010. 1) Custom Site Definition. They are hard-core and somewhat old-school, and require access to the file system. Generally we try to avoid these nowadays, other than as a simple one to be used for feature stapling. 2) Site Template. Now a realistic option because of the new Web Template ...


4

Add a page to the Pages library of your site, name it HomePage.aspx. Add whatever webpart etc. you need to it. Then, in the site settings of the site (_Layouts/AreaWelcomePage.aspx) set the url to point to your custom homepage. Now when someone enters the url of your site (ie. http://mycoolportal.company.local) IIS / SharePoint will point the browser to the ...


4

SharePoint pages already include a #mainContent anchor that you could reuse: <a href="#mainContent">Back to Top</a> I think it is also associated with the accesskey J.


4

You could use PowerShell for this. The most tricky part is checking in/out and approving depending on what type of publishing is enabled, and weather pages are already checked out by others. Check out the stub code below. Included two methods to ensure that checkout and approve is done correctly depending on setup. A couple of things to note: BE AWARE ...


4

Normally, pages created in site/SitePages wont have the Publishing tab because versioning on these Library types are set to "Create major versions" . Major versions do not require Publishing as it creates a new major version when you check-in, save. Pages created in site/Pages will have the publishing because that Library type is set to create "major and ...


4

rjcup, Your client is likely not the right entity to ask what solution is best. If you're the developer, then you should know best and if your client doesn't trust your judgement, then your client has a problem much greater than how to get something done. If that client knows more about SharePoint than you do, then you have a quite different problem as ...


4

Create a new page layout based on the Enterprise wiki but including your web part. This page layout can then be used by all your Enterprise wiki sub-sites. The simplest way is probably to copy the existing Enterprise wiki page layout in the first instance. You will need to use something like SharePoint Designer to achieve this.


4

You can use this method: function ActivateFeature(featureGuid) { var clientContext = new SP.ClientContext.get_current(); var site = clientContext.get_site(); var guid = new SP.Guid('{'+featureGuid+'}'); var featDef = site.get_features().add(guid, false, SP.FeatureDefinitionScope.site); clientContext.executeQueryAsync(Function.createDelegate(this, ...


3

use Reusable Content. 100% out of the box Insert an entry in your Reusable Content list and insert/reference it from a Rich Html field control on both pages (it's your responsibility to place the Rich Html field controls in the right position on your Page Layout or Master Page). You have the option to specify whether you want the content on the pages to ...



Only top voted, non community-wiki answers of a minimum length are eligible