Created
August 10, 2016 13:56
-
-
Save briancribb/2e9f006e48d39c176ae0826cfaa052d4 to your computer and use it in GitHub Desktop.
Get the children of the current page and see if it has a child with a given name. NOTE: Mura functions and methods refer to children as "kids".
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
<cfset directChildren = $.content().getKidsQuery()> | |
<cfquery name="specificChild" dbtype="query"> | |
SELECT * FROM directChildren WHERE title = 'My Specific Title'; | |
</cfquery> | |
<cfif specificChild.recordCount neq 0> | |
<!--- The named child is present, so we'll do some stuff. ---> | |
<cfelse> | |
<!--- Do nothing. ---> | |
</cfif> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment