Steven,
I added the following at #L2467 and then a similar version but with the different $.out at #L2475. The permalinks appear, however the link destinations are incorrect.
Using the category search within the cMap template, the URL returned is:
http://myurl.com/?page_id=890&cn-s=&cn-cat%5B%5D=862
which works correctly, as I implemented your suggestion to enable multiple categories to be selected http://connections-pro.com/support/topic/customization-enhancements/
Using the code below, the category permalink returns: http://myurl.com/category/862/ which loads the Connections page correctly, and has the correct category in the search box, but “No results found”.
Looking at the other permalinks, e.g. http://myurl.com/locality/London/ I saw that the term itself is used rather than the term_id so I tried:
‘slug’ => $category->name
But this put every category in the system in the search box (and therefore returned everything).
I did check for conflicts in the permalinks settings. Connections uses ‘category’ and WordPress uses ‘cat’.
Any suggestions?
foreach ( $categories as $category ) {
$this_category = cnURL::permalink( array(
'type' => 'category',
'slug' => $category->term_id,
'title' => $category->name,
'text' => $category->name,
'home_id' => $this->directoryHome['page_id'],
'force_home' => $this->directoryHome['force_home'],
'return' => TRUE
)
);
$out .= '<li class="cn_category" id="cn_category_' . $category->term_id . '">' . $this_category . '';
}
