I'm having a hard time understanding what you are trying to do here,
but I bet this is your issue:

<cfif isdefined ("#get_content.sMetaKey#")

This logic translates to:

What is the value of get_content.smetakey? Take that value, and see if
it exists as a variable.

I'd be willing to bet you wanted

<cfif isdefined ("get_content.sMetaKey")

On Thu, Mar 15, 2012 at 6:37 AM, Matt Gibson <[email protected]> wrote:
>
> Hi, I apologise if I am being daft with tihs query, but I am a total newbie 
> and I have been kind of thrown in at the deep end on our website!!
>
> Anyway, I am trying to display our keywords on a category page.
>
> There are three locations the keywords could be, if all three are not present 
> then I would like to generate an appropriate keyword using the category name.
>
> This is my query. At the moment it would seem the cfelse is just appending a 
> query to all of the three below conditions, so i am generating two sets of 
> meta keywords! I just want the statement after cfelse to appear if none of 
> the above have been found.
>
> Please can you help, I'm flummoxed!!
>
> <cfif isdefined ("qGetCat.sMetaKey") and qGetCat.sMetaKey NEQ "" and 
> qGetCat.sMetaKey NEQ "<br />">
>   <meta name="keywords" content="<cfoutput>#qGetCat.sMetaKey#</cfoutput>" />
>   </cfif>
> <cfif isdefined ("qGetBrand.sMetaKey") and qGetBrand.sMetaKey NEQ "" and 
> qGetBrand.sMetaKey NEQ "<br />">
>   <meta name="keywords" content="<cfoutput>#qGetBrand.sMetaKey#</cfoutput>" />
>   </cfif>
> <cfif isdefined ("#get_content.sMetaKey#") and #get_content.sMetaKey# NEQ "" 
> and #get_content.sMetaKey# NEQ "<br />">
>   <meta name="keywords" content="<cfoutput>#get_content.sMetaKey#</cfoutput>" 
> />
> <cfelse>
>   <meta name="keywords" 
> content="<cfoutput>#qGetCat.category_Name#</cfoutput>"/>
> </cfif>
>
>
>
> Cheers,
>
> Matt
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5825
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to