Seeking developers' opinion on Grav capabilities


#1

Hi everyone,

I’ve been following Grav for a while. And I’ve built a couple of simple site with it.
It’s “Da bomb” if you ask me. For lots of reason already mentioned plenty of time.
I know the work of Andy and its team since the early days of Joomla ! and it’s always been “rhuk” solid ! lol
Hence why I want to see if I can stick to this amazing CMS.

So I’m seeking the opinion of developers to insure Grav will suit the project needs.

I’m now working on a project that will have a slightly more elaborated search than title and content.
Aside form regular content pages, I will have a section with specific content type.
This type of content will have custom fields for attribute of the building and suites.
It’s a list of building with the available suites for each one. Note that there is currently only a dozen building and will not have much more in the coming years.

I’m thinking of having a specific blueprint for building page and a specific blue print for suites. Which will be added as child of a building page.
Or using a repeater custom field set in a building page.
Not sure yet the best approach. But it’s important to note that a suite will never be display on its own page. It’s always displayed in a building page.

Here is a bullet list of what I need to achieve but not sure if that can be done.

  • on list view, need to display number of available suites attached to a building.
  • on list view, need to display the smallest and highest available suites which will be a custom field
  • search needs to be done on specific custom field.
  • search needs to have a dropdown with multiple range of square foot option. Which mean if you select from the dropdown the option “between 1000 and 2000 sqf”, then any building that has a suites with a floor plan matching that option should be displayed in the result.
  • search needs to have other options that are taken from other building attributes like “commercial” vs “residential”.

I’ve looked at the TNTSearch plugin and it seems to allow indexing and searching custom fields. But I’m not sure how easy and/or possible it is to make it work with a range.

Other approach I was thinking for the search would be to do all this using entire a javascript search functionality using ajax to fetch the json of all buildings and their suites.

I know this can be done using WordPress or Joomla ! But I would like to use Grav if possible.

Thank you in advance.


#2

In the opinion of this developer, everything on that bullet-list as well as the preceding two paragraphs can be achieved with Grav. It is “simply” a matter of utilizing the Pages-object to iterate through each listing to make it available for the search mechanism, which I would do in PHP for robustness. The TNTSearch- or SimpleSearch-plugins may leave you wanting more here, and I would go with a more generic library that you can customize to fit the shape of the data (for a few alternatives, see this repo).

On the back-end, regarding blueprints, a separate page/blueprint for suites sound reasonable to me. Child pages are easier to organize than potentially massive fields. Even if it won’t typically display on its own page, there’s no reason not to leave that possibility open (think photo-gallery for a hotel room).

On the front-end, the basics are easily achievable with Twig. For searching, filtering, sorting, use a custom form and GET-queries/parameters. From recent experience, and given what speeds even a cheap shared hosting server has these days, you can run it all through PHP and mask the processing with JS. This ensures greater compatibility (for oddities in JS and disabled JS), accessibility (deep-linking pre-renders), and performance (a large set of data renders less obtrusively server-side than client-side).


#3

Thank you very much for your reply OleVik. It’s well appreciated.
Thank you for confirming my points and giving new pointers. That’s cool.

Grav is really powerful under the hood for a flat file CMS.
lol when you think of the millions of website running something like wordpress when you have only a few static pages. oh my oh my ! lol

Thanks again, and sorry for my late reply. I’ve been enjoying a gorgeous summer in Montreal with lots of music festivals. And if anybody reading this who is a fan of Radiohead. GO see them, they’re touring right now. It was awwwwwesome ! 2.5 hours of pure visual and musical pleasure.


#4

I’ll confirm that too, Grav has ‘endless’ ways of doing the things you listed. So I see no reason why it wouldn’t suit your needs ;)! Good luck with it :slight_smile: feel free to ask away if you get stuck!


#5

Thanks a lot too RobLui.