CMS

Drupal 7 create custom form module with system variables

Categorías: 

Etiquetas: 

Objective

Create a custom module with a form to set/get custom system variables from Drupal. We're going to add custom permissions to access this new page. Bonus: add simple page to count every node for each content type.

Summary

  • Step 1: create custom module
  • Step 2: call hook_menu and hook_permissions
  • Step 3: create custom callbacks for new menus
  • Step 4: create a Drupal form by code. Form, validate and submit

Wordpress custom admin table from database with pagination

Categorías: 

Etiquetas: 

Objective

  • Create a custom table with data from a database sql query, with sort and pagination, in WordPress admin panel.
  • Step 1: create a custom menu link to access a new page for the table
  • Step 2: create callback function for the menu link, prepare data input for pagination, sort and print form + table
  • Note: this should be improved to use full WordPress advantages of wp_list_table

Step 1: create a custom menu link to access a new page for the table

Páginas

Subscribe to CMS