Condition and keyword

8 posts by 2 authors in: Forums > CMS Builder
Last Post: January 16, 2008   (RSS)

By Djulia - January 15, 2008

Hi,

I would like to obtain the value of keyword.

I used Print_r to check if the value were available, but keyword is always given without value.

For :
<xmp><?php print_r($record); ?></xmp>
the value is always : [keywords] =>

I would like to obtain a condition :

<?php if ($keyword == ""): ?> ...

An idea ?

Thank you for your assistance.

Djulia

Re: [Djulia] Condition and keyword

By Dave - January 15, 2008

Is keyword the name of a field in the database or a form field?

If it's a form field, you can display it like this:

<?php echo $FORM['keyword'] ?>

also, you can try print_r($FORM);
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Condition and keyword

By Djulia - January 15, 2008

<?php echo $FORM['keyword'] ?>

It is exactly what I seek. [:)]

Thank you, Dave.

Re: [Djulia] Condition and keyword

By Dave - January 15, 2008

Looks like you're on the right track. and and or should work. You can also write those as && and ||. What is the condition you want to test?

Note: If you're using the latest version you can search multiple fields for the same keyword like this:

content,tags_keyword

or

title,summary,content_keyword

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Condition and keyword

By Djulia - January 15, 2008 - edited: January 15, 2008

>> Note: If you're using the latest version you can search multiple fields...

You want to say :
<input type="text" name="tags,title,content_keyword" value="" size="15">

That does not function for me.

Djulia

Re: [Djulia] Condition and keyword

By Djulia - January 15, 2008

My excuses, this functions perfectly. [:)]

It is my condition which was incorrect.

Djulia

Re: [Djulia] Condition and keyword

By Dave - January 16, 2008

Oh, that's good news! Thanks for reporting back! :)
Dave Edis - Senior Developer
interactivetools.com