You are here

function search_by_page_path_field_prefix in Search by Page 6

Same name and namespace in other branches
  1. 8 search_by_page.module \search_by_page_path_field_prefix()
  2. 7 search_by_page.module \search_by_page_path_field_prefix()

Returns a suitable field prefix for a path.

This is your base site URL, with ?q= appended if clean URLs are not being used. It can be used in a Form API form as component #field_prefix, if you are asking the user to input a URL path.

2 calls to search_by_page_path_field_prefix()
sbp_paths_edit_form in ./sbp_paths.module
Returns a form for editing a path item.
search_by_page_admin_settings in ./search_by_page.module
Returns the admin settings page for a single search environment.

File

./search_by_page.module, line 447
Main module file for Drupal module Search by Page.

Code

function search_by_page_path_field_prefix() {
  return url(NULL, array(
    'absolute' => TRUE,
  )) . (variable_get('clean_url', 0) ? '' : '?q=');
}