SELECT *
FROM DOCUMENTS
WHERE dirname = $dirname AND rendersToHTML = true