Show sticky nodes

List of nodes marked sticky

Display a list of sticky nodes. This combines a database query with some basic HTML generation.

  • Vietnam: American Holocaust [DVD]
  • Trailer for Vietnam: American Holocaust

The Code:

<?php
    $sql 
'SELECT title FROM {node} WHERE sticky = 1';
    
$ul qp('<?xml version="1.0"?><ul></ul>')
      ->
query($sql)
      ->
withEachRow()
      ->
appendColumn('title''<li/>')
      ->
top()
      ->
html();
  
?>

References:

The QueryPath API