Skip to content

Instantly share code, notes, and snippets.

@nathanbrauer
Last active December 20, 2015 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanbrauer/b8d56528051b25de3e1e to your computer and use it in GitHub Desktop.
Save nathanbrauer/b8d56528051b25de3e1e to your computer and use it in GitHub Desktop.
<?php
$this->Categories()->column('Title');
SELECT
DISTINCT "SiteTree"."Title",
"SortOrder"
FROM "SiteTree"
INNER JOIN "CategoryPage_Resources" ON
"CategoryPage_Resources"."CategoryPageID" = "SiteTree"."ID"
WHERE
("CategoryPage_Resources"."ResourcePageID" = '1052')
AND
("SiteTree"."ClassName" IN ('CategoryPage'))
ORDER BY SortOrder ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment