Forum

Thread tagged as: Problem, Addons, Blog

search results only for blog entries

I'm trying to have a search that returns results only from the perchBlog app.

I'm running runway, blog app installed and have multiple blogs setup.

I know from the documentation this should be possible by adding to the 'perch_content_search() array'

perch_content_search(perch_get('q'),array(
            'count' => 2,
            'apps' => array('perchBlog'),
            'template' => 'search-result-faqs.html',
        ));

Currently I'm getting zero results from this when I search using a string that I know is included in a post.

Any help appreciated.

Summary report

Perch Runway: 3.0.11, PHP: 5.6.36, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (3.0.11), assets (3.0.11), categories (3.0.11), perch_blog (5.6.1), perch_forms (1.11), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_blog', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /volume1/web/xxx/perch
PERCH_CORE: /volume1/web/xxx/perch/core
PERCH_RESFILEPATH: /volume1/web/xxx/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
HTTP_HOST: xxx.site
DOCUMENT_ROOT: /volume1/web/xxx
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Graham Shedden

Graham Shedden 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Try PerchBlog instead of the perchBlog you have.

If that doesn't help, turn on debug and let us know what it outputs for the search.

Thanks Drew Changed it to 'PerchBlog' and that's got it working.

I did try a few different ways but not that one!

Thanks.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That comes direct from the documentation, so that's always a good point of reference.

Thanks Is there anyway to target a specific blog when using multiple blogs, using the blog title for example?

Drew McLellan

Drew McLellan 2638 points
Perch Support

There isn't, I'm afraid.

OK, thanks anyway.