-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][TASK] Add configuration error note for single view plugins (#94)
To prevent the usage of plugins that should only be used on post views we are now adding additional checks for those. If no post could be resolved - also means if the plugin is used on pages that do not match the `Constants::DOKTYPE_BLOG_POST` - the plugins will now return a new message to make the miss usage visible. ``` A possible configuration error was detected. No matching post could be obtained. Make sure that this plugin is only used on a post. ``` The following plugins will now show this message if no post could be obtained: * Authors * Footer * Header * Metadata * RelatedPosts Templates added: * Layouts/Post.html Templates changed: * Templates/Comment/Comments.html * Templates/Comment/Form.html * Templates/Post/Authors.html * Templates/Post/Footer.html * Templates/Post/Header.html * Templates/Post/Metadata.html * Templates/Post/RelatedPosts.html Releases: master
- Loading branch information
1 parent
48d408d
commit 780f018
Showing
11 changed files
with
64 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<f:spaceless> | ||
<f:if condition="{post}"> | ||
<f:then> | ||
<f:render section="Content" /> | ||
</f:then> | ||
<f:else> | ||
<div class="alert alert-danger" role="alert"> | ||
<div class="alert__title"><f:translate key="general.message.configuration_error.title"/></div> | ||
<div class="alert__message"><f:translate key="general.message.configuration_error.single_no_post"/></div> | ||
</div> | ||
</f:else> | ||
</f:if> | ||
</f:spaceless> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
<f:if condition="{post} && {settings.comments.active}"> | ||
<div class="postcommentsform" id="postcommentform-{post.uid}"> | ||
<f:variable name="formName" value="Local" /> | ||
<f:if condition="{settings.comments.disqus._typoScriptNodeValue}"><f:variable name="formName" value="Disqus" /></f:if> | ||
<f:if condition="{post.commentsActive}"><f:else><f:variable name="formName" value="Closed" /></f:else></f:if> | ||
<f:render partial="Comments/Form/{formName}" arguments="{_all}" /> | ||
</div> | ||
</f:if> | ||
<f:layout name="Post" /> | ||
<f:section name="Content"> | ||
|
||
<f:if condition="{post} && {settings.comments.active}"> | ||
<div class="postcommentsform" id="postcommentform-{post.uid}"> | ||
<f:variable name="formName" value="Local" /> | ||
<f:if condition="{settings.comments.disqus._typoScriptNodeValue}"><f:variable name="formName" value="Disqus" /></f:if> | ||
<f:if condition="{post.commentsActive}"><f:else><f:variable name="formName" value="Closed" /></f:else></f:if> | ||
<f:render partial="Comments/Form/{formName}" arguments="{_all}" /> | ||
</div> | ||
</f:if> | ||
|
||
</f:section> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<f:spaceless> | ||
<f:layout name="Post" /> | ||
<f:section name="Content"> | ||
|
||
<f:if condition="{post.authors}"> | ||
<div class="postauthors"> | ||
<f:for each="{post.authors}" as="author"> | ||
<f:render partial="Post/Author" arguments="{_all}" /> | ||
</f:for> | ||
</div> | ||
</f:if> | ||
</f:spaceless> | ||
|
||
</f:section> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
<f:spaceless> | ||
<f:layout name="Post" /> | ||
<f:section name="Content"> | ||
|
||
<footer class="postfooter"> | ||
<f:if condition="{settings.meta.postfooter.enable}"> | ||
<div class="postfooter__meta"> | ||
<f:render partial="Meta/PostFooter" arguments="{_all}" /> | ||
</div> | ||
</f:if> | ||
</footer> | ||
</f:spaceless> | ||
|
||
</f:section> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<f:spaceless> | ||
<f:layout name="Post" /> | ||
<f:section name="Content"> | ||
|
||
<f:render partial="Meta/Default" arguments="{_all}" /> | ||
</f:spaceless> | ||
|
||
</f:section> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<f:layout name="Default" /> | ||
<f:layout name="Post" /> | ||
<f:section name="Content"> | ||
|
||
<f:render partial="SimpleList" arguments="{_all}" /> | ||
|
||
</f:section> |