Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

"Generic Views" Module is not longer supported in 2.4?


Reply


3 Posts   632 Views

Avatar
tfliam

Community Member, 20 Posts

14 November 2011 at 12:31am

Hi,

I have been following the tutorials from the book "The Complete Guide to CMS Development" by Ingo Schommer and Steven Broschart. I am now on the section 6.8 - Generic Views Using CollectionController.

I am about going to download the module Generic Views, but find out that it is only compatible in version 2.3.2, 2.3.3 and 2.3.4. For more info, you may go http://www.silverstripe.org/generic-views-module/

My question is, why is it no longer compatible in 2.4? Is there any other module that replace Generic Views module?

Thanks for clearing my doubts.

Avatar
JohnnyJimJams

Community Member, 2 Posts

9 January 2012 at 1:40pm

Edited: 09/01/2012 2:03pm

I'm also in the same situation. I installed the genericviews module(latest from github - 3f4397f) on a fresh v2.4.6 install regardless, and it appears to work ok except for the templates which are a little bit messed up See the screenshot attached.

I'll investigate further, but does anyone else have any advice on what module to use instead of generic views?

Edit: I'm using the "blackcandy" theme

Attached Files
Avatar
JohnnyJimJams

Community Member, 2 Posts

9 January 2012 at 3:13pm

The problem in my case (see the screenshot above of incorrect templates) was a naming conflict.

I did a search and replace in CollectionController.php of "SearchForm" to "SearchFormCollection" (5 occurances)

and updated the Layouts/CollectionController.ss as follows:

      <% if SearchFormCollection %>
      <h3><% _t('SEARCH','Search') %></h3>
      $SearchFormCollection
      <% end_if %>

There are other ways to fix this issue, but at least this way you can still use the standard site wide $SearchForm variable.