Recent Topics

1 Apr 12, 2014 14:44    

I have created a 'search form' in the widgets tab, but I have no idea how to implement a search bar onto my main blog page. I am using a custom skin I created.

http://blog.donnacadhobriain.co.uk/index.php

Thanks!

2 13 Apr 2014 09:16

Hello @kieranvyas,

I'm sorry but, what do you mean when you said "search bar"? Your skin should have containers, and they are supposed to host the widgets. So, the search form should be placed in one of those containers in order to be correctly displayed.

Please make sure you read this page: http://b2evolution.net/man/create-a-new-skin, specially the Skin zones section. If it is not useful enough, please explain a little bit more what are you trying to do.

Thanks.

3 13 Apr 2014 12:20

@mgsolipa wrote earlier:

Hello @kieranvyas,

I'm sorry but, what do you mean when you said "search bar"? Your skin should have containers, and they are supposed to host the widgets. So, the search form should be placed in one of those containers in order to be correctly displayed.

Please make sure you read this page: http://b2evolution.net/man/create-a-new-skin, specially the Skin zones section. If it is not useful enough, please explain a little bit more what are you trying to do.

Thanks.

It's ok, I have copied the search bar form from another skin and it seems to work. I hope just simply copying the form from a different skin won't cause any issues?

http://blog.donnacadhobriain.co.uk/index.php

6 19 Apr 2014 19:21

You should add a new "Skin zone" (http://b2evolution.net/man/create-a-new-skin) to each *.disp.php page that you want to include in the skin, reload the containers of that skin (http://b2evolution.net/man/manage-skins) and add a "Search form" widget into the new container.

The new code that you need to add to each *.disp.php file should be something like this:


<div class="search_bar">
	<?php
	// ------------------------- "Search bar" CONTAINER EMBEDDED HERE --------------------------
	skin_container( NT_('Search bar'), array(
	    'block_start'         => '',
	    'block_end'           => '',
	    'block_display_title' => false,
	    'list_start'          => '',
	    'list_end'            => '',
	) );
	// ----------------------------- END OF "Search bar" CONTAINER -----------------------------
	?>
</div>

If you follow this instructions, the search form will be properly loaded in the place that you choose, according the layout of your page. And also, you will be able to decide to include the advanced search options both, in every page or just after to make a search.

Regards!


Form is loading...