Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to customize the landing page of an SP2010 Wiki Page Library, so far without success.

From looking at a couple of blogs (for example this one), there seems to be a feature called "WikiPageHomePage" that sets the landing page to Home.aspx. But although this feature is not activated on the site in question, there is clearly code present that's doing the same thing.

I need to do two things:

  1. Change this behaviour such that a reference to this library (for example, the DetailLink of a ListView) resolves to some other page (n.b. if I rename Home.aspx to Somethingelse.aspx, the reference resolves to .../Forms/AllPages.aspx, which is reasonably good).

  2. Ideally, resolve the reference differently depending on the audience (for example, editors see an editing page while viewers see a main wiki page).

I've built HTTP handlers before (once for a third-party Wiki), but I'd like to avoid going that route if possible because it seems like overkill for this problem.

I've seen several blogs that reference a Welcome Page site setting, but since this is not a site, but just a library, that setting doesn't seem to apply.

Any nugget of assistance will be very helpful.

Josh

share|improve this question
add comment

2 Answers

Even though this is just a Wiki Page Library the WelcomePage property will work. Here is how you can set it using PowerShell:

$web = Get-SPWeb http://sharepoint
$list = $web.Lists["Second page lib"]
$list.RootFolder.WelcomePage = "How%20To%20Use%20This%20Library.aspx"
$list.RootFolder.Update()

The page you set it to should exists otherwise it choose the All Pages view.

If you need a different welcome page depending on the audicence then the easist way is create a dummy page (or just choose the most common page) as WelcomePage and then include a control which redirects depending on who comes in

share|improve this answer
    
Per, this looks promising - which means I haven't tried it yet, but I will this afternoon. –  Josh Korn Mar 27 '12 at 17:59
    
It does indeed work (yay!). I ended up using a different technique for hiding pages: it might not fit every situation, but it did fit ours with not much work. In short, I used per-location view settings in order to hide the views used for privileged work (such as editing), then put a link to each privileged view in QuickLaunch, inside an audience-targeted group. It works for us because there turned out to be a manageable number and depth of quicklaunch-links. –  Josh Korn Mar 30 '12 at 20:43
add comment
  1. If this is just a Wiki Library rather than a site then the Welcome Page setting won't help since this affects the whole site.
  2. If you are just looking to have the Wiki Library default to the All Pages view then rename Home to anything else.
  3. If you want the main page to be a specific page you've already created, just rename it to Home.
  4. Automatic redirect based on audiences will need to be done through code, but a simpler solution would be to just customize the links using audience settings on the web part with the links and just link directly to the page(s) you want them to go to. To do this just add a content editor web part with the link to Wiki\SomethingElse.aspx or whatever and another content editor web part with the link to Wiki\OtherUsers.aspx and set the audience settings on each.
share|improve this answer
    
Chris, I already know about items 1, 2 and 3 (otherwise I wouldn't have posted). On 4, although a content editor web part is nominally simpler, it's actually more work since I have to apply this to >1 page. Any idea how to achieve redirection via code? –  Josh Korn Mar 27 '12 at 17:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.