Setting a page number from the URL, with fallbacks
You could re-write it something like this:

&lt;cfif StructKeyExists(stElement,'idInfoPage') AND isNumeric(stElement.idInfopage)&gt;
    &lt;cfset idInfopage = stElement.idInfopage /&gt;

&lt;cfelseif StructKeyExists(Url,'idInfoPage') AND isNumeric(Url.idInfopage)&gt;
    &lt;cfset idInfopage = Url.idInfopage /&gt;

&lt;cfelse&gt;
    &lt;cfset idInfopage = 0 /&gt;

&lt;/cfif&gt;


Notes on the changes:


StructKeyExists is generally recommended over isDefined.
isNumeric wont return true for empty string.



If you have a lot of code like this, it might make sense to create a function, something like:

&lt;cfset idInfopage = getNumberOrZero('idInfopage',stElement,Url) /&gt;


Then implemented as:

&lt;cffunction name="getNumberOrZero" returntype="numeric" output=false
    hint="Loops through structs (args 2..n) looking for number; else return 0"&gt;
    &lt;cfargument name="Key" type="String" required /&gt;
    &lt;cfset var i = 0 /&gt;

    &lt;cfloop index="i" from=2 to=#ArrayLen(Arguments)#&gt;
        &lt;cfif StructKeyExists(Arguments[i],Arguments.Key)
            AND isNumeric(Arguments[i][Arguments.Key])
            &gt;
            &lt;cfreturn Arguments[i][Arguments.Key] /&gt;
        &lt;/cfif&gt;
    &lt;/cfloop&gt;

    &lt;cfreturn 0 /&gt;
&lt;/cffunction&gt;