List of nodes marked sticky

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

  • Deep Fool Chapter 1
  • Life

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