On this page
Embed a finder
Using PHP
The simplest way to embed a finder with PHP is to enable the 'provide block' option and use code like so:
<?php
print theme('block', finder_block('view', 'finder_X'));
?>
Where X is the finder id integer (which you can figure out from the URL of the admin pages).
If you need more control than this, consider looking into the functions: finder_view(), theme('finder_page'), or theme('finder_block'). You should also check user_access('use finder'); to see if the user has permission to use the finder in these cases, as it is not done automatically like when you embed the block.
If you are embedding a finder into your page.tpl.php file, please be aware that it is much easier to just create a new block region in your template and use the UI to put a finder block there. The reason is that autocomplete finders need a bit of extra work to get them working when embedded in a tpl file, because the JavaScript file will be missing.
Embed finder into a node
If you want to easily embed a finder in a node, try the Block reference module.
Resources
More discussion about embedding finders here:
#1214082: Replace core search with a fancy Finder form
#1086360: Autocomplete suggestions not showing up when manually printing with finder_view
#1072020: Embed Finder in other websites
#582276: Embed Finder form in node?
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion