Last active
August 29, 2015 14:12
-
-
Save xu-chris/0a581de896c30029d766 to your computer and use it in GitHub Desktop.
Using search() for kellertheater.de
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finds the specific description page for a play in 'repertoire' | |
function findDescriptionPage($name, $pages) { | |
// Break Conditions | |
if (empty($name) || empty($pages) || $pages->find('repertoire') == false) return false; | |
// First round: exact matches | |
if($result = $pages->find('repertoire')->children()->visible()->search($name, 'title|label|author|uid')) return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment