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 ...


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 ...


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

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

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

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, ...


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

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

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 ...


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

Take a look to this link that explain How propagation works: http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/12/sharepoint-2013-variations-content-synchronization-between-source-and-target-variations.aspx Also check the timer jobs that are responsible of the propagations and the Variations log. From the link: Custom lists and ...


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 ...


3

Can't you just change the Web Site name from "inc" to "Main Page"? If that isn't right for you, thern you could put a snippet of jQuery in the master page to find and replace the "inc" text. Update: Here's a real life example. On the Home Page of SophiaThink Consulting's site, we're using the Smiling Goat RSS Web Part. There's no way with that Web Part ...


3

If your data is in a SharePoint List, you could just create a view on the List that is specifically of type DataSheet with the appropriate columns, go through the steps of adding a Web Part to your page (Site Actions-->Edit Page...) picking your SharePoint List which will use the default view initially, then choose Modify the Web Part from its dropdown menu ...


3

You can remove the Workflow and Approval Process from the pages Library. To do so Site Actions - > View All Site Content - > Open Pages Lib and In the Pages Library select Settings -> Document Library Settings -> Versioning settings Select the Following Say no to Require content approval for submitted items? Select No Versioning And In Workflow settings ...


3

Try this: Go to Site Actions, Manage Content and Structure. Click the View menu and change to: Checked Out To Me for drafts that needs to be checked in (unfortunately there is no built-in filter to check for all drafts) All Draft Documents for pages to be published Pending Approval for pages to be approved Click the 'select all' icon above all of the ...


3

Changing content in a single page could be done in many ways. For code changes in several pages http modules would not be my first choice (it would probably be one of my last due to performance depending on what needs to be done). Much more elegant (and less intrusive) methods exists, such as code behind in master page or page layout or inheriting from ...


3

That information changes dynamically does not mean you have to use a web part. Use web parts when you -need designer/contributor to change the default functionality by either adding web parts or change properties on web parts without having to involve a developer -have a specific reason like using it as filter web part, connected web part, caching etc. ...



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