How to set the search box source code?

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
3/12/2012 2:47:37 AM
kok
Gravatar
Total Posts 47

How to set the search box source code?

 thgehi there, May I knhow to se

3/12/2012 2:51:43 AM
kok
Gravatar
Total Posts 47

Re: How to set the search box source code?

hi there,
May I know how to set the search box source code?
can list the step?
thanks.

3/12/2012 1:32:49 PM
Gravatar
Total Posts 115
mojoPortal Community Expert

Re: How to set the search box source code?

If you are wanting to know how to add the searchbox to a site and style it the instructions are located here.

3/12/2012 9:00:02 PM
kok
Gravatar
Total Posts 47

Re: How to set the search box source code?

Hi Aaron,

i have found this code before,

but how to set it? can you  list the step or tips?

thanks.

3/13/2012 8:37:13 AM
Gravatar
Total Posts 115
mojoPortal Community Expert

Re: How to set the search box source code?

The SearchInput control goes into the layout.master but more then likely there is already one there and you just have to set the correct options. Make sure there are not two instances of the SearchInput as it will cause a headache for you.

The CSS you can just add to your style.css file for your skin.

3/13/2012 9:14:08 PM
kok
Gravatar
Total Posts 47

Re: How to set the search box source code?

Hi Aaron,

I already try to set in layout.master, but the layout inteface will confusion after set in,

which part wrong? can you help me to check? thanks.

 

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="~/App_MasterPages/layout.Master.cs"
    Inherits="mojoPortal.Web.layout" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<head id="Head1" runat="server">
    <title></title>
 <%-- JQueryUIThemeName valid options are:
 base, black-tie, blitzer, cupertino, dark-hive, dot-luv, eggplant, excite-bike, flick, hot-sneaks,
 humanity, le-frog, mint-choc, overcast, pepper-grinder,
 redmond, smoothness, south-street, start, sunny, swanky-purse, trontastic, ui-darkness, ui-lightness, vader
 --%>
    <portal:StyleSheetCombiner ID="StyleSheetCombiner" runat="server" JQueryUIThemeName="ui-darkness"
        UseIconsForAdminLinks="false" UseTextLinksForFeatureSettings="false" />
    <portal:IEStyleIncludes ID="IEStyleIncludes1" runat="server" IncludeHtml5Script="false"
        IE6CssFile="style.ie6.css" IE7CssFile="style.ie7.css" />
    <portal:MetaContent ID="MetaContent" runat="server" />
    <!--[if IE]>
 <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" /><meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
 <![endif]-->
    <portal:Favicon ID="Favicon1" runat="server" />
    <portal:ScriptLoader ID="ScriptLoader1" runat="server" />
    <portal:SkinFolderScript ID="sfs1" runat="server" ScriptFileName="script.js" />
<portal:SearchInput id="SearchInput1" 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"
/>

</head>
<body class="pagebody">
    <form id="frmMain" runat="server">
    <asp:SiteMapDataSource ID="SiteMapData" runat="server" ShowStartingNode="false" />
    <asp:SiteMapDataSource ID="PageMapDataSource" runat="server" ShowStartingNode="false" />
    <asp:SiteMapDataSource ID="ChildPageSiteMapData" runat="server" ShowStartingNode="false" />
    <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
    <div id="art-page-background-gradient">
    </div>
    <div id="art-page-background-glare">
        <div id="art-page-background-glare-image">
        </div>
    </div>
    
<div id="art-main">
        <div class="art-sheet">
            <div class="art-sheet-tl">
            </div>
            <div class="art-sheet-tr">
            </div>
            <div class="art-sheet-bl">
            </div>
            <div class="art-sheet-br">
            </div>
            <div class="art-sheet-tc">
            </div>
            <div class="art-sheet-bc">
            </div>
            <div class="art-sheet-cl">
            </div>
            <div class="art-sheet-cr">
            </div>
            <div class="art-sheet-cc">
            </div>
<portal:SiteLogo id="SiteLogo" runat="server"/>
<div class="art-sheet-body">
                <div class="art-nav">
                    <div class="l">
                    </div>
                    <div class="r">
                    </div>

                 
<portal:SiteMenu ID="SiteMenu1" runat="server" UseTreeView="false" UseArtisteer="true"
                        HideMenuOnSiteMap="false" Direction="Horizontal"></portal:SiteMenu>


            </div>
                <div class="art-header">

                   <div class="art-logo">
                        <portal:SiteTitle ID="SiteTitle" runat="server"></portal:SiteTitle>
                        <portal:SkipLink ID="SkipLink1" runat="server" />
                        <mp:InsecurePanel ID="InsecurePanel1" runat="server" CssClass="addthisbutton">
                            <portal:mojoAddThisButton ID="at2" runat="server" AccountId="" ButtonImageUrl="~/Data/SiteImages/addthisbookmarkbutton.gif"
                                Text="Share This Using Popular Bookmarking Services" CustomBrand="" CustomLogoUrl=""
                                CustomLogoBackgroundColor="" />

                        </mp:InsecurePanel>
                        <div id="slogan-text" class="art-logo-text">
                            <portal:SiteSlogan id="ss1" runat="server" /></div>
                    </div>
                </div>
                <div class="art-content-layout">
    <div class="art-content-layout-row">
                    <asp:Panel ID="divLeft" runat="server" CssClass="art-layout-cell art-sidebar1 leftside" Visible="True" SkinID="pnlPlain">
                        <asp:ContentPlaceHolder ID="leftContent" runat="server">
                        </asp:ContentPlaceHolder>
                    </asp:Panel>
                    <asp:Panel ID="divCenter" runat="server" Visible="True" CssClass="center-rightandleftmargins"
                        SkinID="pnlPlain">
                        <portal:Breadcrumbs ID="Breadcrumbs" runat="server"></portal:Breadcrumbs>
                        <portal:ChildPageMenu ID="ChildPageMenu" runat="server" CssClass="txtnormal"></portal:ChildPageMenu>
                        <a id="startcontent"></a>
                        <asp:ContentPlaceHolder ID="mainContent" runat="server">
                        </asp:ContentPlaceHolder>
                    </asp:Panel>
                    <asp:Panel ID="divRight" runat="server" Visible="True" CssClass="art-layout-cell art-sidebar2 rightside" SkinID="pnlPlain">
                        <asp:ContentPlaceHolder ID="rightContent" runat="server">
                        </asp:ContentPlaceHolder>
                    </asp:Panel>
     </div>
                </div>
                <div class="cleared">
                </div>

                <div class="art-footer">
                    <div class="art-footer-inner">
                        <a href="#" class="art-rss-tag-icon" title="RSS"></a>
                        <div class="art-footer-text">
                            <p>
                                           <portal:LoginLink ID="LoginLink" runat="server" RenderAsListItem="true" />
            <portal:LogoutLink ID="LogoutLink" runat="server" RenderAsListItem="true" />
 <portal:SiteMapLink ID="SiteMapLink1" runat="server" CssClass="sitemaplink" />
                                |
                                <portal:SkinPreview ID="SkinPreview1" runat="server"></portal:SkinPreview>
                                |
                                <portal:CopyrightLabel ID="cl1" runat="server" ShowYear="true" BeginYear="2010" />
                              
                              </a></p>
                        </div>
                    </div>
                    <div class="art-footer-background">
                    </div>
                </div>
                <div class="cleared">
                </div>
            </div>
            <div class="cleared">
            </div>
        </div>
        <div class="cleared">
        </div>
        <p class="art-page-footer">
        <br /><br />
        </p>
    </div>
 <div class="topnavwrap">
    <div class="topnav">
        <ul>
            <portal:WelcomeMessage ID="WelcomeMessage" runat="server" RenderAsListItem="true"
                ListItemCss="firstnav" />
            <portal:HomeLink ID="HomeLink" runat="server" RenderAsListItem="true" />
            <portal:SiteMapLink ID="SiteMapLink2" runat="server" CssClass="sitelink" RenderAsListItem="true" />
            <portal:MyPageLink ID="MyPageLink1" runat="server" RenderAsListItem="true" />
            <portal:UserProfileLink ID="UserProfileLink" runat="server" RenderAsListItem="true" />
            <portal:MailboxLink ID="MailboxLink1" runat="server" RenderAsListItem="true" />
            <portal:MemberListLink ID="MemberListLink" runat="server" RenderAsListItem="true" />
            <portal:SearchInput ID="SearchInput1" LinkOnly="True" RenderAsListItem="true" runat="server" />
            <portal:RegisterLink ID="RegisterLink" runat="server" RenderAsListItem="true" />

        </ul>
    </div>
 </div>

    <script type="text/javascript">
        function HideMenuToolbar() { $("#toolbar").fadeOut(); $("#toolbarbut").fadeIn("slow"); }
        function ShowMenuToolbar() { $("#toolbar").fadeIn(); $("#toolbarbut").fadeOut("slow"); }
        $(document).ready(function() {
            $("span.downarr a").click(function() { HideMenuToolbar(); Set_Cookie('openstate', 'closed') });
            $("span.showbar a").click(function() { ShowMenuToolbar(); Set_Cookie('openstate', 'open') });
            $("span.downarr a, span.showbar a").click(function() { return false; });
            var openState = Get_Cookie('openstate');
            if (openState != null) { if (openState == 'closed') { HideMenuToolbar(); } if (openState == 'open') { ShowMenuToolbar(); } }
        }); 
    </script>

    <portal:AutoHidePanel ID="ah1" runat="server">
        <div id="toolbarbut">
            <span class="showbar"><a href="#">show bar</a></span>
        </div>
        <div id="toolbar">
            <div class="toolbarleft">
                &nbsp;
            </div>
            <div class="toolbarright">
                <span class="downarr"><a href="#"></a></span>
                <portal:AdminMenuLink ID="lnkAdminMenu" runat="server" />
                <portal:FileManagerLink ID="lnkFileManager" runat="server" />
                <portal:NewPageLink ID="lnkNewPage" runat="server" />
                <portal:PageEditFeaturesLink ID="lnkPageContent" runat="server" />
                <portal:PageEditSettingsLink ID="lnkPageSettings" runat="server" />
                <asp:ContentPlaceHolder ID="pageEditContent" runat="server">
                </asp:ContentPlaceHolder>
            </div>
        </div>
    </portal:AutoHidePanel>
    <portal:mojoGoogleAnalyticsScript ID="mojoGoogleAnalyticsScript1" runat="server" />
    <portal:Woopra ID="woopra11" runat="server" />
    </form>
</body>
</html>

3/13/2012 10:38:18 PM
Gravatar
Total Posts 2253

Re: How to set the search box source code?

Hi,

You shouldn't put the control inside the <head>, put it inside the <form>.

Also, you already have a SearchInput control in your layout.master (it's toward the bottom and renders as a link) so you need to change the ID of the SearchInput you are adding to SearchInput2.

HTH,
Joe D.

3/13/2012 10:55:19 PM
kok
Gravatar
Total Posts 47

Re: How to set the search box source code?

Hi Joe,

i already have a searchinput control in layout.master? but why cannot work? have mistake?

for now i no need add more, just use back original file?

how to show out the search box?

thanks.

3/13/2012 11:05:01 PM
Gravatar
Total Posts 2253

Re: How to set the search box source code?

Most skins have a SearchInput control in them but it doesn't show a search box, it shows a search link.

Change the ID of the SearchInput control you added to SearchInputBox1.

HTH,
Joe D.

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