Open
Conversation
Contributor
Author
|
@zmsdev:
|
Contributor
Author
|
@zmsdev
Error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The custom-command searches inline-links in any text-typed fields and tries to resolve/fix the target of the href-attribute. The current ZMS-codes applies the href-value as relative URL and fits it dynamically on rendering on basis of the data-uid-atttribute (by zmsindex-query). So actually the UID has to be resolved on any rendering and the URL fitted "in-context".
Fitting the URL to the published context
The inline-links appear primarily as relative and do not work if not adjusted to the rendered/published context. The challenges when resolving a link to a target object are:
Switch to Absolute Inline-URLs
To get a better performance this ex-post-computation on rendering may be saved - if the inserted URL could be utilized (in the very most cases). So instead using relative (dummy-) URLs we may think about absolute URLs. Because Zope-absolute are not the published URL in most case, we need at least the domain-name the ZMS-client servers and the URL-fragment where the published path starts. This can be provides as ZMS-config-parameters:
Example:
Zope-URL like
/sites/portal/client1/content/e123/e456will result in an line-Link likehttps://www.test.de/e123/e456if following config-parameters are set:www.test.de/sites/portal/client1/content/https(default)Screenshot: Link-Validator
