Skip to content

Proposal: How to integrate content from another domain #3

@jonnitto

Description

@jonnitto

Instead of setting the inProjectSourceUrl we could have a setting like this:

Flowpack:
  Neos:
    WhatsNewDashboard:
      inProjectSourceUrl: 
        baseUrl: 'https://example.com'
        path: '/new'
        token: 'GI19cT6OfWaU5AVYmt7QmR29EimxClemH'

Like that we could check if the page in Flowpack.Neos.WhatsNewEditor.InMyProject:Document.WhatsNewDashboardPage will be showed like this:

${Security.isAuthenticated() || request.arguments.token == Configuration.Setting('Flowpack.Neos.WhatsNewDashboard.inProjectSourceUrl.token')}

This would require also a cache entry:

    @cache {
        mode = 'dynamic'
        maximumLifetime = ${q(node).context({'invisibleContentShown': true}).add(q(node).children('[instanceof Neos.Neos:ContentCollection]').find('[instanceof Neos.Neos:Content]')).cacheLifetime()}
        entryIdentifier {
            node = ${node}
        }
        entryDiscriminator = ${request.arguments.token}
        context {
            1 = 'node'
            2 = 'documentNode'
            3 = 'site'
        }
        entryTags {
            1 = ${Neos.Caching.nodeTag(node)}
            2 = ${Neos.Caching.descendantOfTag(node)}
        }
    }

Of course the Javascript from the modal should respect also these settings

Why splitting the inProjectSourceUrl in three parts?

  1. With the baseUrl we are able to make the api request for the timestamp
  2. With the token the user don't need to be logged in
  3. If baseUrl and/or token is not set, everything would work as now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions