Search Input Watermark Text

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
10/29/2010 12:25:59 PM
Gravatar
Total Posts 156

Search Input Watermark Text

It would nice to have an ability to set custom text via an attribute for <portal:SearchInput> so one doesn't have to recompile mojoPortal.Web project to change the string.

Also, the <portal:SearchInput> doesn't show on the SearchResult page itself and it would be nice have the search control enabled on that page regardless as I have a place holder for it at the top and always want it to show there if possible.

10/29/2010 12:47:44 PM
Gravatar
Total Posts 18439

Re: Search Input Watermark Text

In version 2.3.5.5 you can set the OverrideWatermark property on SearchInput to anything you like.

I've made a note about your request for an option to show SearchInput on searchresults.aspx, I will do that for the next release.

Best,

Joe

10/29/2010 1:12:47 PM
Gravatar
Total Posts 156

Re: Search Input Watermark Text

Thanks Joe.  Works great.

10/29/2010 2:21:37 PM
Gravatar
Total Posts 156

Re: Search Input Watermark Text

While you are at it, could you add an attribute to the HomeLink  control to hide it when the user is actually on the home page itself?  Or maybe you could just add an additional CSS class to the rendered HTML, indicating that the user is currently at the home page?

10/31/2010 7:07:46 AM
Gravatar
Total Posts 18439

Re: Search Input Watermark Text

While that may sound like a simple request, it really is not. There is nothing special about the home page that identifies it as the home page.  The home page is nothing more than the page in the site that has no parent page (ie a root level page) and has the lowest page sort. Other than that it has no difference to other pages and the page doesn't know if it currently has the lowest sort. One can freely move pages around and put a different page in the home page position. While we create a home page by default with the url /home.aspx, we cannot rely on that since it can be changed or removed and some other page put in the home position of the hierarchy.

About the only simple thing I could do is add an extra css class on the home page link like homelink and then one could add javscript to the layout.master file to hide it with jQuery something like this (not tested):

if((window.location == "http://yoursiteroot/")||(window.location == "http://yoursiteroot/default.aspx") || (window.location == "http://yoursiteroot/home.aspx")){ $('a.homelink').hide(); }

I will add the class homelink for the next release but it would still be up to you to add javascript to hide it based on the possible urls for your home page.

Best,

Joe

10/31/2010 7:09:32 AM
Gravatar
Total Posts 18439

Re: Search Input Watermark Text

Actually you could specify the CssClass on the HomeLink as "sitelink homelink" and try this technique with the current release. You don't need to wait for me to add this homelink class.

Best,

Joe

10/31/2010 5:05:19 PM
Gravatar
Total Posts 156

Re: Search Input Watermark Text

I just thought I'd run the idea by you.  You don't really have to add anything to it, not even a class.  I can easily hide the link w/  JQuery based on the URL.

11/14/2010 7:11:08 PM
Gravatar
Total Posts 156

Re: Search Input Watermark Text

I've noticed that the search box doesn't show up on the login page either.  It would also be nice to have a config key to pick whether to show it on login page or not along with the search results page.

Thanks in advance, Joe!

11/20/2010 8:18:07 AM
Gravatar
Total Posts 18439

Re: Search Input Watermark Text

I've added new properties on the SearchInput control for the next release to allow controlling this from the skin.

It will support the following properties all of which default to true

  • HideOnSearchResultsPage
  • HideOnLoginPage
  • HideOnRegistrationPage
  • HideOnPasswordRecoveryPage

Best,

Joe

11/20/2010 3:21:41 PM
Gravatar
Total Posts 156

Re: Search Input Watermark Text

Great news, Joe.  Thank you so much for this!

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