Welcome, Guest
Username: Password: Remember me
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
  • Page:
  • 1

TOPIC: Use joodb loop and joodb ifis in the same sentence

Use joodb loop and joodb ifis in the same sentence 5 months 6 days ago #5034

  • developer_calvo
  • developer_calvo's Avatar Topic Author
  • Offline
  • Posts: 1
  • Thank you received: 0
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 or Create an account to join the conversation.

Use joodb loop and joodb ifis in the same sentence 4 months 2 weeks ago #5040

  • direktion.phoenixschule
  • direktion.phoenixschule's Avatar
  • Offline
  • Posts: 3
  • Thank you received: 0
< tr > ist not in your ifis....

Please Log in or Create an account to join the conversation.

Use joodb loop and joodb ifis in the same sentence 4 months 2 weeks ago #5041

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1031
  • Karma: 21
  • Thank you received: 186
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

Please Log in or Create an account to join the conversation.

Last Edit: by Dirk.
  • Page:
  • 1
Moderators: Dirkjoest