× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

Use joodb loop and joodb ifis in the same sentence

More
5 years 1 month ago #5034 by developer_calvo
Hi everyone

I have problems to return only the data where the status is equal to published, in this way it returns everything

<!-- LOOP Start {joodb loop} -->
<tr >
{joodb ifis|estatus|[publicado]|[ne]}
<td><h5><center>{joodb fecha}</center></h5></td>
<td style="width: 20%;"><center><h4>{joodb solicita}</h4></center></td>
<td>
<font color="#691c32"><strong><h4 style="margin: 0;">{joodb nombre_empresa|125}</h4></strong></font>
<p>Contacto: {joodb contacto|125}</p>
<p>Teléfono: {joodb telefono|125}</p>
{joodb readon}
</td>
</tr>
{joodb else}
<ul>
<li>No vacancy</li>
</ul>
{joodb endif}

<!-- LOOP End {joodb loop} -->

Help me please!!!

Please Log in to join the conversation.

More
5 years 1 month ago #5040 by direktion.phoenixschule
Replied by direktion.phoenixschule on topic Use joodb loop and joodb ifis in the same sentence
< tr > ist not in your ifis....

Please Log in to join the conversation.

More
5 years 1 month ago - 5 years 1 month ago #5041 by Dirk
Sorry for the late response.

{joodb ifis|estatus|[publicado]|[ne]}

Please don't use [] inside joodb commands! The [] are only symbols in documentations to indicate that parameters are optional.

So the correct command should be
{joodb ifis|estatus|publicado|ne}

But this makes no sense. It displays the following block only if the field estatus is not = "publicado"!

Tipp: The published field should be tinyint! 0 invisible or 1 published
Then you can use
{joodb ifis|estatus}
// publisehed show the data
{joodb else}
// Hidden: show something else
{joodb endif}

And yes: you forgot to close the table row <tr> with </tr>
Thank you @phoenixschule
Last edit: 5 years 1 month ago by Dirk.

Please Log in to join the conversation.

Moderators: Dirkjoest