Searching Single Pages with Dynamic Content

Permalink
I have a slight problem I have been trying to address for a client I have been working with. We have 4 sets of single pages that are loading content from a database using PHP based upon a get string that is provided. These pages that are generated are optimized well for SEO and have alt tags for images and Content that we need to be able to search using a search feature.

Now i had assumed (An everyone knows what assuming gets you) that these pages by default would be able to be searched by the concrete 5 built in search feature. But it doesn't work. If I search for a word that I know is definitely on one of these pages even multiple times no results are found.

How can I make Concrete5 search these pages. If its no do able by a default or by a plugin, then can someone please offer some advice on how to fix this. This is an important feature and must be completed.

 
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
Are you running your automated jobs?
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
You could try to implement PHP Crawler as an alternative search.

http://sourceforge.net/projects/php-crawler/...
evilchinesefood replied on at Permalink Reply
Any other thoughts? Automated jobs didn't help me at all. Im trying to be able to search pages like distributor.php?id=5 or id=3. Those all pull data out of the database to create the dynamic pages. Google CSE isn't an option because of the ads it puts with the search as those end up showing our competitors ads on our site. Any help would be so much appreciated.
planist1 replied on at Permalink Reply
planist1
Just a thought, but do you have pretty urls enabled?
planist1 replied on at Permalink Reply
planist1
Just a thought, but do you have pretty urls enabled?
planist1 replied on at Permalink Reply
planist1
Just a thought, but do you have pretty urls enabled?
evilchinesefood replied on at Permalink Reply
Yes I Do x3 lol :)
planist1 replied on at Permalink Reply
planist1
Wow that was a little crazy. Not sure why it posted three times. Yikes. Sorry about that. Anyhow, I am not certain if c5 can scan pages that are dynamically created utilizing url parameters. Have you thought about making two different search pages? One for C5 pages and the other for your dynamic pages. Then just create single pages for the search and results pages of your dynamic data?
planist1 replied on at Permalink Reply
planist1
So I was messing around with this some more and I was able to get the search box to search not only c5 content based on the url parameter of "query" but I also copied out the concrete/blocks/search to root/blocks/search. Then modified the view.php file. This might point you in the right direction... maybe? This is very ugly and needs some serious styling, but I got it to work using LIKE in my MySQL statement. Here is the content of the root/blocks/search/view.php file that I copied.

<?php  defined('C5_EXECUTE') or die("Access Denied."); ?>
<?php  if (isset($error)) { ?>
   <?php echo $error?><br/><br/>
<?php  } ?>
<form action="<?php echo $this->url( $resultTargetURL )?>" method="get" class="ccm-search-block-form">
   <?php  if( strlen($title)>0){ ?><h3><?php echo $title?></h3><?php  } ?>
   <?php  if(strlen($query)==0){ ?>
   <input name="search_paths[]" type="hidden" value="<?php echo htmlentities($baseSearchPath, ENT_COMPAT, APP_CHARSET) ?>" />
   <?php  } else if (is_array($_REQUEST['search_paths'])) { 
      foreach($_REQUEST['search_paths'] as $search_path){ ?>
         <input name="search_paths[]" type="hidden" value="<?php echo htmlentities($search_path, ENT_COMPAT, APP_CHARSET) ?>" />
   <?php   }
   } ?>
   <input name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" class="ccm-search-block-text" />
   <input name="submit" type="submit" value="<?php echo $buttonText?>" class="ccm-search-block-submit" />