Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 5, 20168 yr On my old 3.x board, I could embed search results into a page to have a topic page (good for SEO). For example, this page would have 'topic1' search results on it, so you could just link people to site.com/topic1. Is there any easy was on 4.x to do the same thing? I'm desperate to make some topic pages to link to. Thanks, Christian
October 5, 20168 yr Author I created a block that seriously *almost* works. {{ $query = \IPS\Content\Search\Query::init(); $query->setLimit( 20 ); $title = "Search Term"; $results = $query->search( $title ); $count = $results->count( TRUE ); $termArray = $query->termAsWordsArray( $title ); $baseUrl = \IPS\Http\Url::internal( 'app=core&module=search&controller=search', 'front', 'search' ); $pagination = trim( \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->pagination( $baseUrl, 1, 1, 0 ) ); }} {template="resultStream" group="search" params="$results, $pagination, $baseUrl"} But that bottom line kills it. I've tried returning the template in PHP also. Page just times out. Can anybody tell me what I'm doing wrong? Thanks, Christian
Archived
This topic is now archived and is closed to further replies.