Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7686529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:30:06+00:00 2026-05-31T19:30:06+00:00

I have a custom navigation menu for my SharePoint intranet web application which is

  • 0

I have a custom navigation menu for my SharePoint intranet web application which is composed of multiple site collections.

The navigation menu is organized differently from the underlying site collections
(ex. items from two different site collections are in the same navigation section).

Now I need to add security so that menu items are hidden based on permissions.

If one of the menu items has a full url of "http://intranet.test.com/sites/Accounting/Pages/Welcome.aspx" then is there a function that I could run from the SharePoint object model that would take that url and return an SPSite object for my site collection at "http://intranet.test.com/sites/Accounting"?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:30:07+00:00Added an answer on May 31, 2026 at 7:30 pm

    SPSite is quite happy to take the full url and deduce the site from there, nothing you need to do, normal SPSite constructor:

    using (SPSite mySiteCollection = new SPSite ("http://intranet.test.com/sites/Accounting/Pages/Welcome.aspx"))
    {
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom UserControl that I created as a navigation menu that parses
Have created a custom navigation menu in wordpress that has some pages and some
I am developing a navigation based application and I have a custom titleView and
i am facing a new problem. I have custom navigation controller in my application.
I am building a custom navigation menu in Magento which displays the categories from
Ive got an iPhone/iPad universal application and I wanted to have a custom navigation
I have a custom view for my navigation bar title, which I am setting
I have a custom UINavigationController that draws a custom background. That navigation controller is
I have created a flexible navigation bar in my app that will show custom
I have jqgrid and in that I have one custom navigation button to export

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.