Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

template question

edited February 2011 in Vanilla 2.0 - 2.8
how can i change the layout of the "Search" and "Ask a Question" page ?
i use the BrandFriendly theme
i want to keep the default.master.tpl layout
with the search results on left for the search page and the form on add new post

Comments

  • The default search box setup is handled in a few different places depending on context.

    The main page version appears either in the inline PHP script or a Smarty template:

    themes/themename/views/default.master.php

    $Form = Gdn::Factory('Form'); $Form->InputPrefix = ''; echo $Form->Open(array('action' => Url('/search'), 'method' => 'get')), $Form->TextBox('Search'), $Form->Button('Go', array('Name' => '')), $Form->Close();

    OR

    themes/themename/views/default.master.tpl

    {searchbox}

    which calls the custom Smarty function in "library/vendors/SmartyPlugins/function.searchbox.php".

    In both cases, they are using the Garden form class to generate the form. If you want to change the look you could just copy the rendered HTML of the search box and paste that into your template. Here is a Smarty template version of the form:

    <div class="Search"><form method="get" action="{link path="/search"}"> <div> <input type="text" id="Form_Search" name="Search" value="" class="InputBox" /> <input type="submit" id="Form_Go" value="Go" class="Button" /> </div> </form></div>


    Alternatively (or as well), you can adjust the look a fair amount via CSS.

    Cheers
  • hmm thanks for responding but i ment the search page and add new post page not the search form
  • @quasiperfect

    The default search result page is generated by:

    applications/dashboard/views/search/index.php

    You can customize this by copying that file to:

    themes/themename/views/search/index.php

    The default start discussion page is loaded via:

    applications/vanilla/views/post/disucssion.php

    You can customize it by copying that to:

    themes/themename/views/post/disucssion.php

    You can also go with ".tpl" versions but it will take some work to replicate the same functionality.

    Cheers
  • hmm no luck the content of the panel doesn't render just the empty div
  • @quasiperfect : what did you change in which template. It might be time to start debugging. Do you want to change the search form or the search results?

    There was an error rendering this rich post.

  • i want to show the categories and tagged and everything in the side pannel on the search page and add new post page
  • any suggestions ?
Sign In or Register to comment.