header search

Hello

I want to add to the header search an search-button. With a click on it, you can start the search. Anybody an idea for me, i'm sorry, I search for hours for a solution, but i can't find one.

  • Do you already have a search input field in the header? The default Elgg theme adds such a field but the Aalborg theme unregisters this field from the header and adds it to the sidebar. So, if you are using the Aalborg theme you need to override this again. See the init function in start.php of the Aalborg theme for the two lines of code you would need (in reverse) to restore the original search input field of the default theme.

    Then the submit button of the search input is not displayed (by setting display:none both in the search plugin css and the Aalborg theme css for the .elgg-search [input=submit] class). You would have to change that by overriding this css class.

    If the button is displayed again it will look ugly due to no css styling defined. Add the styling you want as .search-submit-button class. This class is referred in the file mod/search/views/default/search/search_box.php where the search input field is set up but the class itself is not defined in any css file. If you don't get the search input to look like you want by the search-submit-button class alone you might need to override the file mod/search/views/default/search/search_box.php to allow for some additional modifications.

  • thank you. That's exactly the information i need.