SearchBox in 2.5.0.0

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
8/2/2017 9:17:48 AM
Gravatar
Total Posts 4

SearchBox in 2.5.0.0

Hi,

it is possible to show searchbox somewhere in navbar in mojoportal version 2.5.0.0? Am I missing something obvious?

Thank you

9/4/2017 12:04:44 AM
Gravatar
Total Posts 5

Re: SearchBox in 2.5.0.0

Hi,

bumping this post, and referring to:

https://www.mojoportal.com/styling-the-search-input-box

when i was searching for the same thing. However, it doesnt function as I want to, how can I place the search bar just above the main menu?

Also, is it possible to make searches matching containing words?

I would like the search function to match: "cons" in "consequence". As of now, i need to search "consequence" to find the related post or page... IRL people never search full words :)

 

Thanks,

bump again

 

<portal:SearchInput id="SearchInputBox1" runat="server" 
  LinkOnly="false" 
  RenderAsListItem="false" 
  ImageUrl="skinbase_magnifier.png" 
  ButtonCssClass="searchbutton" 
  TextboxCssClass="searchbox" 
  OverrideWatermark="enter search terms" 
  UseHeading="false" 
  HideOnLoginPage="true" 
  HideOnPasswordRecoveryPage="true" 
  HideOnRegistrationPage="true" 
  HideOnSearchResultsPage="true" 
  HideOnSiteSettingsPage="true" 
/>

9/6/2017 12:41:18 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: SearchBox in 2.5.0.0

Hi,

If you place the control you mentioned above your main menu inside the layout.Master file in your skin, the search box should appear above your main menu. You may have to add style to your skin to make this look the way you w ant it to, but it will render the markup in the right order. What problem did you run into with this specifically?

As for searching, if you go to the /searchresults.aspx page on any mojoPortal site you should see a small "help" question mark somewhere around the search options (visuals depend in the skin). If you click that, it will pop up and tell you how you can perform fuzzy searches. In this case, if you typed "cons*" the search would return all matching words that start with the string "cons", like "consequence" or "consistent". If you typed "cons~" it would return all matching words that have any sub-arrangement of the characters in the word "cons", for instance "icons", or even "cols" (because "co" is a sub-arrangement). We don't think this behavior should be automatic for half-typed words because some sites are very large, and fuzzy searches would result in thousands of pages of results with no guarantee that they are very relevant.

Hope this helps!

9/6/2017 1:07:32 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: SearchBox in 2.5.0.0

Josef,

I'm sorry your original post didn't get a response for so long, we must've missed it. If you want to add a search box after your menu in Framework, you can use the following markup, just replace the div with the class "collapse navbar-collapse" on line 56 of the layout.Master in framework with this:

<div class="collapse navbar-collapse" id="site-menu">
    <div class="navbar-form navbar-right">
        <portal:SearchInput id="SearchBox1" runat="server" 
            LinkOnly="false"
            RenderAsListItem="false"
            ButtonCssClass="btn btn-success"
            TextboxCssClass="form-control"
            OverrideWatermark="enter search terms..."
            OverrideButtonText="Search"
            UseHeading="false"
            HideOnLoginPage="false"
            HideOnPasswordRecoveryPage="false"
            HideOnRegistrationPage="false"
            HideOnSearchResultsPage="false" 
            HideOnSiteSettingsPage="false"
        />
    </div>
    <portal:SiteMenu id="SiteMenu1" runat="server" MenuSkinId="MainMenu" UseFlexMenu="true" />
</div>

You'll have to style things to your liking of course, but this will get the basic placement in bootstrap done. You can adjust the classes for navbar-left/navbar-right to rearrange what order they sit in as well. You'll also need to add some custom responsive CSS to make sure this doesn't break on smaller screens and different devices.

Hope this helps.

9/7/2017 9:55:00 AM
Gravatar
Total Posts 4

Re: SearchBox in 2.5.0.0

Thank you

You must sign in to post in the forums. This thread is closed to new posts.