Sharepoint Search Results Scopes - search

Currently I have a search set up on our Sharepoint 2010 server. The search works fine on the first try however after one search (aka the results page) the scope is defaulted to "this site:search".
I would like to modify the scope options on this page however I cannot seem to locate where to do so?
I would like the same scopes to display on both my results page and original search page. In summary the problem is the search is set up as a separate site and when the results page is displayed the only scope option is this site which esentially has no content. So an added bonus would be to remove the this site option from the page.
For now anyways the search has to stay as a separate site.
Thanks in advance.
UPDATE
In order to allow for additional scopes in the results page you must go to the site settings (as admin) > Search Settings > Site Collection Search Center and Enable Custom Scopes
I still need to know how to default to all site or hide this site search.

I too had the similar issue,in order to solve go to site settings->search scopes and then click displaygroups->drop down serach for
Click on Drop down serach for,a form opens where you can define serach scopes and at the bottm you can set the defuat search scope.Hope this helps

Below are the steps I had to take:
I had to set the specific search page and edit the web part settings to make sure they do NOT "Use site dropdown mode" or "Use site level defaults".
Set the dropdown mode of that webpart to be "Show, do not include contextual scopes, and default to 's' URL parameter".
In the miscellaneous section set the target search results page url to the results page in my search center. IE (/Search/Pages/results.aspx) in my case.
Add a search box to the results page with the same drop down mode as in step 2 above. I suggest navigating to your empty results page and then site actions > edit. Add the web part as normal.
Make sure you have done the step above by going to (/_layouts/enhancedSearch.aspx ) and setting the url to your search center (/Search/Pages) in my case.

I had the same problem when I used the Basic Search Site template, but not when I used the Enterprise Search Site template, which allowed me to edit Web Parts on the search AND the results page to show the scope dropdown.
To remove "This Site" from the scope list, edit both search box Web Parts and choose "Show, do not include contextual scopes."
Also, you will need to enable Publishing Infrastructure feature on the site collection before you can create a search site using the Enterprise Search Site template.
I also changed the master page on the search site to minimal.master to improve the layout.

Related

Dynamics 365 - Open search page programmatically

Is there a way to open a the following page programmatically using Xrm as we can open forms or dialogs ?
Sort of, but I'm not sure its supported, the search page is presented as part of the main.aspx page. There is no obvious option to force the main page to open the search content documented.
However, if you open the search page, and debug the contents you can get a URL that points to the search page contents.
You could then append that address to your CRM URL and you will be redirected to the search page, however all the CRM menu bars are missing.
I.e. (note main.aspx is omitted) https://yourcrm.crm4.dynamics.com/externalsearch/externalsearch.aspx?option=0&sitemappath=projects%7cMyWork%7cnav_dashboards&text=

SharePoint 2013 Custom result page URL for search queries

I'm trying to redirect the search queries to a search center url. I've created the search center and I use the Search Settings to set a result page url (my search center results.aspx).
I've tried setting the custom page for site collection and leave the site setting on "Use the same results page as my parent". I've also tried setting the custom page url directly in the site setting. But still the search results is shown on the site's "osssearchresults.aspx" page.
Am I forgetting something? It's like sharepoint is ignoring those settings.
Have a look at the actual search box web part settings. There is a properties for Search box where you can choose to use the default or you can send queries to a custom results page URL.
See if that is where the issue is.
Try this link for further information > https://learn.microsoft.com/en-us/sharepoint/search-box-web-part

Links on SharePoint 2010 Master Page not changed based on Alternate Access Mappings

We are creating a custom branded Master Page in SharePoint 2010. To make the page similar to a legacy page we have implemented an html based custom dropdown navigation menu we had in place directly on the Master Page (consisted of basic HTML elements ULs and LIs with A tags styled with a CSS class).
I assumed the links from the basic HTML on the page would be subject to Alternate Access Mappings currently in place, but it seems to not be the case. On a test page opened in 3 different URLs (http://sharepoint2010, http://sharepoint2010.mydomain.com, https://sharepoint2010.mydomain.com) the links from a WIKI page are modified as I expected, but the links from the Custom Navigation Menu (plain HTML on the Master Page) are not modified.
I can see where that would be useful... But is there a way that I can add links on the MasterPage in a way that SharePoint parses them first, making them subject to Alternate Access Mapping translation? I tried placing a link inside a SPLinkButton control, but it didn't achieve the desired behavior.
e.g.
<ul id="navmenu">
<li><SharePoint:SPLinkButton runat="server" NavigateUrl="http://sharepoint2010">sharepoint link</SharePoint:SPLinkButton></li>
<li>sharepoint2010</li>
<li>test</li>
</ul>
When I access the page via https://sharepoint2010.mydomain.com the links above are still http://sharepoint2010 rather than https://sharepoint2010.mydomain.com
Any thoughts?
Thanks,
Victor
EDIT (clarify):
I was planning on using relative links as a fallback. But for the purpose of what we are doing it would be more maintainable if we could keep the full links and use AAM.
I'm aware that standard relative links are a possibility. I was hoping to identify if there is a way to use AAM on Master Page content (or even on Content Retrieved from External Services down the road) by providing a specific link syntax, or control framework.
There is no need to re-insert the host name if your links are on the same domain and you're not using managed paths. Keeping your links relative will ensure that any bindings in IIS and AAM setup in SharePoint will work without any additional work.
Otherwise, I would heavily suggest to use the available ~sitecollection and ~site SPUrl token to retrieve the current site collection url or current web url. You need to wrap it in anything running server side as the expression will be handled ... server side.
eg:
<asp:Literal runat="server" Text="<% $SPUrl:~site/press-releases/ %>"/>
Hope it helped
When you use the NavigateUrl= attribute of the SPLinkButton, SharePoint renders a simple anchor with href= instead of regular PostBack JavaScript code. Alternate access mapping do not play a role here.
If its simply relative links you want, then leave out the dns entry altogether (ie the bit of the url you are switching with your AAM) and begin the url with a forward slash to make it relative. If this doesn't meet your needs, the way Sharepoint does it is with a relative url token. Have a look in v4.master for the tilda character followed by 'site' or 'sitecollection' which refers to the current web and site collection respectively. Copy this method. For more details, look at this link: http://msdn.microsoft.com/en-us/library/ms473643.aspx

Setting the Search Scope for Sharepoint Site Collection

This is really strange. I have 2 SP Web Applications. One at Port 80 and one at Port 83.
They are both TeamSites with the Publishing Feature Activated. Both have a search box at the top right that allows me to specify the search scope.
The one at Port 80 allows me to select:
This Site: Home
All Sites
People
The one at Port 83 allows me to select:
This Site: Intranet
For both sites, i looked at:
http://share2003/_layouts/viewscopes.aspx?mode=site
http://share2003:83/_layouts/viewscopes.aspx?mode=site and
The settings are identical. I will like to enable the rest of the search scopes for the web application at Port 83.
Please advise.
I had a similar situation, where some of the site collections in my farm (1 WFE, 1 DB) contained all of the correct scopes ({This Site: , [This List: ], All Sites, People}), but others were missing "All Sites" and "People".
The site collections which were missing these Scopes also did NOT have the "Advanced Search" link to the right of the search box.
On all of the site collections where these scopes were available (and where the Advanced Search link was available), there was a sub-site (aka web) named something like "Search", and that sub-site was specified in the Site Collection settings -> Search Settings as the Search Center to use to show richer results (the first radio button option).
So on one of my site collections which was missing Scopes, I created a Search Center sub-site and set it as the custom search center (Site Collection settings -> Search Settings). After that, all scopes were available and "Advanced Search" is now shown.
Thanks to http://insidesharepoint.blogspot.com/2007/06/and-now-another-word-form-our.html , which helped put me on the right path.

Why can't I override the default master page content in a SharePoint publishing page?

So I've setup a site collection using the Publishing Portal template and stubbed out a prototype site structure including three tiers. At the second tier I've created a Publishing site and developed a custom master page for the site and its third tier children. The problem is that the banner graphic on a few pages should be modified to be inconsistent. Then I add two new ContentPlaceHolder controls to my master page in SharePoint Designer and use the SharePoint interface to create my new publishing pages. Finally, I verify in SharePoint Developer that they have the correct master page, add my asp:content controls to the pages and insert the page-specific banner graphic. The only problem is that the master page default content continues to be rendered in all page instances. If I create a new page from the master page in SharePoint designer, I get a different base class in the Page declaration than those created within the Publishing site. Do publishing sites ignore any non-SharePoint contentPlaceHolders?
There is nothing like SharePoint ContentPlaceHolders & non-SharePoint ContentPlaceHolders. When you add a Default content to the Master Page ContentPlaceholder and if you dont override it in the Content Page then it will be visible in all the Pages that use that Master Page. Only way to get rid of it is to Override those Content Place Holder with empty content in the Content Pages. As overriding contentPlaceHolder in all the Pages is not an good Aproach. What I recommend is not to place conent in the ContentPlaceHolder of the Master Page but instead , put the content in the Content Control page of the Pages, so that Content doesn't come in all page but only the page that needs it. Yes it not a good to put the exact same content in multiple page. but in your case that is only the Option. May be you try to wrap the content in to a User Control so that the code can be updated only one place

Resources