netgen / ezplatform-site-api

Netgen's Site API is site building productivity layer for eZ/Ibexa Platform
https://docs.netgen.io/projects/site-api
GNU General Public License v2.0
37 stars 8 forks source link

NGSTACK-442: implement internal Content view route config #184

Closed pspanja closed 4 years ago

pspanja commented 4 years ago

There a several problems with having Internal eZ Platform Content view route (_ez_content_view) on a frontend siteaccess:

This implementes rendering of the route through Site API and a configuration to control whether the route will be active on a frontend siteaccess and how it will behave (showing defaults):

ezpublish:
    system:
        frontend_group:
            ng_site_api:
                enable_internal_view_route: true
                redirect_internal_view_route_to_url_alias: true

The route will be enabled by default and will permanently redirect to the URL alias. If disabled, or if the URL alias can't be generated, 404 will be thrown. If enabled without redirect, it will render the Content through the Site API, instead of using default eZ templates.

pspanja commented 4 years ago

Updated as discussed in private; now the internal route is by default enabled, and will permanently redirect to the URL alias.

pspanja commented 4 years ago

Thanks @emodric