Hook Page Alter using Page ID

Luke: 2 weeks ago

Is it possible to use a Page ID to target a specific page i.e.

function module_pageid_page_alter(&page){

Serenity: 2 weeks ago

By page ID I guess you mean the page path? There isn't a hook like the one you've suggested but you can do basically the same thing in a standard hook_page_alter() like so:

function MYMODULE_page_alter(&$page) {
  if ($_GET['q'] == 'node/1') {
    // Do something for node 1
  else if ($_GET['q'] == 'admin') {
    // Do something for the root admin page