TYPO3 Escape Fluid ViewHelper object properties
up vote
0
down vote
favorite
I get back from a ViewHelper an object domain model 'post' in Fluid, by calling:
{p:lastPost(topic: topic)}
or <p:lastPost topic="{topic}"/>
How do I access the properties in Fluid with this syntax?
Like name would normally be {lastPost.author.name}
And date
{lastPost.crdate -> f:format.date(format: '%d %B %Y')}
typo3 fluid
add a comment |
up vote
0
down vote
favorite
I get back from a ViewHelper an object domain model 'post' in Fluid, by calling:
{p:lastPost(topic: topic)}
or <p:lastPost topic="{topic}"/>
How do I access the properties in Fluid with this syntax?
Like name would normally be {lastPost.author.name}
And date
{lastPost.crdate -> f:format.date(format: '%d %B %Y')}
typo3 fluid
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I get back from a ViewHelper an object domain model 'post' in Fluid, by calling:
{p:lastPost(topic: topic)}
or <p:lastPost topic="{topic}"/>
How do I access the properties in Fluid with this syntax?
Like name would normally be {lastPost.author.name}
And date
{lastPost.crdate -> f:format.date(format: '%d %B %Y')}
typo3 fluid
I get back from a ViewHelper an object domain model 'post' in Fluid, by calling:
{p:lastPost(topic: topic)}
or <p:lastPost topic="{topic}"/>
How do I access the properties in Fluid with this syntax?
Like name would normally be {lastPost.author.name}
And date
{lastPost.crdate -> f:format.date(format: '%d %B %Y')}
typo3 fluid
typo3 fluid
asked Nov 11 at 16:20
Jack70
13718
13718
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
If you are on TYPO3 >= Version 8 you can use the f:variable
Viewhelper. f:alias
works too, but is not as comfortable to use.
For the variable ViewHelper you can use this syntax:
<f:variable name="myPostObject" value="{p:lastPost(topic: topic)}" />
{myPostObject.anyMemberVar}
add a comment |
up vote
0
down vote
accepted
Easy solution found with f:alias
https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/Alias.html
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
If you are on TYPO3 >= Version 8 you can use the f:variable
Viewhelper. f:alias
works too, but is not as comfortable to use.
For the variable ViewHelper you can use this syntax:
<f:variable name="myPostObject" value="{p:lastPost(topic: topic)}" />
{myPostObject.anyMemberVar}
add a comment |
up vote
1
down vote
If you are on TYPO3 >= Version 8 you can use the f:variable
Viewhelper. f:alias
works too, but is not as comfortable to use.
For the variable ViewHelper you can use this syntax:
<f:variable name="myPostObject" value="{p:lastPost(topic: topic)}" />
{myPostObject.anyMemberVar}
add a comment |
up vote
1
down vote
up vote
1
down vote
If you are on TYPO3 >= Version 8 you can use the f:variable
Viewhelper. f:alias
works too, but is not as comfortable to use.
For the variable ViewHelper you can use this syntax:
<f:variable name="myPostObject" value="{p:lastPost(topic: topic)}" />
{myPostObject.anyMemberVar}
If you are on TYPO3 >= Version 8 you can use the f:variable
Viewhelper. f:alias
works too, but is not as comfortable to use.
For the variable ViewHelper you can use this syntax:
<f:variable name="myPostObject" value="{p:lastPost(topic: topic)}" />
{myPostObject.anyMemberVar}
answered Nov 21 at 13:25
Azich
414
414
add a comment |
add a comment |
up vote
0
down vote
accepted
Easy solution found with f:alias
https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/Alias.html
add a comment |
up vote
0
down vote
accepted
Easy solution found with f:alias
https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/Alias.html
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Easy solution found with f:alias
https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/Alias.html
Easy solution found with f:alias
https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewHelper/Alias.html
answered Nov 12 at 10:57
Jack70
13718
13718
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250694%2ftypo3-escape-fluid-viewhelper-object-properties%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown