Jump to:

10993 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » "Generic Views" Module is not longer supported in 2.4?

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 560 Views
  • tfliam
    Avatar
    Community Member
    20 Posts

    "Generic Views" Module is not longer supported in 2.4? Link to this post

    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.

  • JohnnyJimJams
    Avatar
    Community Member
    2 Posts

    Re: "Generic Views" Module is not longer supported in 2.4? Link to this post

    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
  • JohnnyJimJams
    Avatar
    Community Member
    2 Posts

    Re: "Generic Views" Module is not longer supported in 2.4? Link to this post

    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.

    560 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.