Skip to content
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

fluid elements themself does not get rendered #7

Open
rob-ot-dot-be opened this issue May 27, 2020 · 1 comment
Open

fluid elements themself does not get rendered #7

rob-ot-dot-be opened this issue May 27, 2020 · 1 comment

Comments

@rob-ot-dot-be
Copy link

I adjusted a molecule and added f.image and a f.form.button to do a test.
these elements does not get rendered.
Did I miss something on installation ?

<f:layout name="default" /> <f:section name="Main"> <f:render partial="00-atoms/01-global/01-test.fluid" /> BUTTON : <f:form.button>Send Mail</f:form.button> IMAGE: <f:image src="https://dummyimage.com/600x400/000/fff" alt="alt text" /> </f:section>

@NamelessCoder
Copy link
Owner

Both f:image and f:form.* are specific to TYPO3 CMS and will not work in Fluid standalone - you would need to emulate these ViewHelpers, e.g. create an emulated f:image that outputs a plain <img> tag, and emulate <f:form.button> which outputs a simple <button> tag.

Since TYPO3 CMS ViewHelpers often require significant context such as TS and TYPO3 environment with constants etc. it is not possible to we PatternLab with a full TYPO3 context. Depending on which ViewHelpers you need to use you might need to emulate quite a few of the ViewHelpers.

Note also that many ViewHelpers aren't strictly necessary, e.g. <f:form.button> when used without a name does not modify the HMAC checksum and therefore can just as well be served with a raw <button> tag. And of course it is good practice to separate as much of your view logic as possible, from your repository etc. logic - meaning that if you design your templates to work with already processed variables, you have reduced necessity for ViewHelpers and can use static values in the model data JSON files instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants