-
-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUGFIX: Adjust service templates for references #5216
Merged
nezaniel
merged 2 commits into
neos:9.0
from
kitsunet:bugfix/service-templates-reference-nodes
Aug 21, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Neos\Neos\ViewHelpers\Node; | ||
|
||
use Neos\ContentRepository\Core\Projection\ContentGraph\Node; | ||
use Neos\Flow\Annotations as Flow; | ||
use Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper; | ||
use Neos\Neos\Domain\NodeLabel\NodeLabelGeneratorInterface; | ||
|
||
/** | ||
* Viewhelper to render a label for a given Node | ||
*/ | ||
class LabelViewHelper extends AbstractViewHelper | ||
{ | ||
#[Flow\Inject()] | ||
protected NodeLabelGeneratorInterface $nodeLabelGenerator; | ||
|
||
public function initializeArguments(): void | ||
{ | ||
parent::initializeArguments(); | ||
$this->registerArgument('node', Node::class, 'Node', true); | ||
} | ||
|
||
public function render(): string | ||
{ | ||
/** @var Node $node */ | ||
$node = $this->arguments['node']; | ||
return $this->nodeLabelGenerator->getLabel($node); | ||
} | ||
} |
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,14 +1,14 @@ | ||
{namespace neos=Neos\Neos\ViewHelpers} | ||
<html> | ||
<head> | ||
<title>{neos:backend.translate(id: 'node', value: 'Node')}: {node.label}</title> | ||
<title>{neos:backend.translate(id: 'node', value: 'Node')}: {neos:node.label(node: node)}</title> | ||
<meta charset="UTF-8"/> | ||
</head> | ||
<body> | ||
<div> | ||
<h1>{neos:backend.translate(id: 'node', value: 'Node')}: {node.label}</h1> | ||
<h1>{neos:backend.translate(id: 'node', value: 'Node')}: {neos:node.label(node: node)}</h1> | ||
<div class="node"> | ||
<label class="node-label">{node.label}</label> | ||
<label class="node-label">{neos:node.label(node: node)}</label> | ||
<table class="node-properties"> | ||
<caption>{neos:backend.translate(id: 'service.nodes.nodeProperties', value: 'Node Properties')}</caption> | ||
<tr> | ||
|
@@ -17,7 +17,7 @@ <h1>{neos:backend.translate(id: 'node', value: 'Node')}: {node.label}</h1> | |
</tr> | ||
<tr> | ||
<th>_path</th> | ||
<td class="node-path">{node.path}</td> | ||
<td class="node-path">{node.name}</td> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol were blind. This triggers an error it should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pushed ... otherwise the ui e2e fail and no beta |
||
</tr> | ||
<tr> | ||
<th>nodeContextPath</th> | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha there is no
node.parent
lol :DThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, clearly not, oversight, I can do another fix for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah dont worry, #5023 is the full stuff