You are here

function view_mode_page_add_pattern in View Mode Page 8.2

Same name and namespace in other branches
  1. 8 view_mode_page.module \view_mode_page_add_pattern()
  2. 7.2 view_mode_page.module \view_mode_page_add_pattern()
  3. 7 view_mode_page.module \view_mode_page_add_pattern()

DEPRECATED: Add a URL pattern to the database.

This does not add the pattern to the menu_router table, but only adds it to the View Mode Page table.

This method is deprecated and could disappear in future versions. With entity support, you should use view_mode_page_add_entity_pattern.

Parameters

string $content_type: The name of the content type that the pattern is used for.

string $view_mode: The name of the view mode.

string $pattern: The URL pattern that is used in the hook_menu() call.

See also

view_mode_page_add_entity_pattern

1 call to view_mode_page_add_pattern()
ViewModePageTestCase::testAddPattern in ./view_mode_page.test
Test adding a pattern with the non-entity based function

File

./view_mode_page.module, line 473
View Mode Page module allows users to add a page for a specific view mode.

Code

function view_mode_page_add_pattern($content_type, $view_mode, $pattern, $show_title = FALSE, $title = '') {
  return view_mode_page_add_entity_pattern(array(
    'content_type' => $content_type,
    'view_mode' => $view_mode,
    'url_pattern' => $pattern,
    'show_title' => $show_title,
    'title' => $title,
  ));
}