Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Rienk Vlieger
  2. F2C Search front-end
  3. Friday, April 15 2016, 11:56 AM
  4.  Subscribe via email
Form2Content 6.13.0
Form2Content Search 6.5.0

Hi,

When showing results dynamically, is it possible to show a text when no results are found?

Regards,
Rienk
Accepted Answer
Julien Accepted Answer Pending Moderation
Hello Rienk,

This can be done by a little hack in the file components/com_form2contentsearch/views/common/default.php

You can then add a piece of code like this:

if($this->params->get('item_count') == 0)
{
echo 'no results are found';
}


best,
Julien
  1. more than a month ago
  2. F2C Search front-end
  3. # Permalink
Responses (4)
F2C webmaster Accepted Answer Pending Moderation
Sorry for the later than usual reply.

At the moment we have no standard solution for that. However I think it's interesting. It should be doable via a template override and adding some logic to it. However, I have to ask Julien for that bit of php ;).

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C Search front-end
  3. # 1
Rienk Vlieger Accepted Answer Pending Moderation
My client is very interested so it would be great if Julien would do that!
Please keep me informed.

Regards,
Rienk
  1. more than a month ago
  2. F2C Search front-end
  3. # 2
Rienk Vlieger Accepted Answer Pending Moderation
Julien,

Thanks a lot, works like a charm!

I copied com_form2contentsearch/views/search/tmpl/default.php
to
templates/mytemplate/html/com_form2contentsearch/search/default.php

and added

<?php if($this->params->get('item_count') == 0)
{
echo '<br/>No results are found.';
}?>

after line 24.

Regards,
Rienk
  1. more than a month ago
  2. F2C Search front-end
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.