Skip to content

How can I define multiple entities to be amp-ified? #9

@echosa

Description

@echosa

Currently, I'm able to get my Article entities "amp-ified" like this (after changing the default amp-theme to call the correct getters):

takeit_amp_html:
    model: MyBundle\Entity\Article
    routing:
        route_strategy:
            pattern: '{controller}/{action}'
            parameter: 'url'

With that, I can go to /platform/amp/article/view/article-url-goes-here and see the amp version.

Now, I'd like to also have the same thing for News entities. However, I don't see a way to define multiple entities, though. Am I missing something? I'd like something like this or similar:

takeit_amp_html:
    entity: 'article'
        model: MyBundle\Entity\Article
        routing:
            route_strategy:
                pattern: '{controller}/{action}'
                parameter: 'url'
        theme:
            current_theme: "article-theme"
    entity: 'news'
        model: MyBundle\Entity\News
        routing:
            route_strategy:
                pattern: '{controller}/{action}'
                parameter: 'url'
        theme:
            current_theme: "news-theme"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions