Comments (24)
Hi Ina!
Thank you for your report. Currently the backend preview templates are not part of the export extension. I have to investigate here as I never used this feature before. Please give me a couple of days to analyze the export possibilities here.
Thank you!
from mask_export.
Hi Ina!
It seems I misunderstood your request. I thought you speaking about the "Page Templates" part of the mask module. Now I understand that you are referring to the output of your content elements in the backend view, aren't you?
Can you provide the templates you made along with the mask.json file? Thank you very much.
from mask_export.
Hi Nicole,
yes, I was talking about the backend preview:
In the zip file you find the template and the mask.json file
mask_json_backend_tempalte.zip
from mask_export.
Hi Nicole,
mask build backend preview via typo3conf\ext\mask\Classes\Hooks\PageLayoutViewDrawItem.php
The addition is made in ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY] = 'EXT:' . $_EXTKEY . '/Classes/Hooks/PageLayoutViewDrawItem.php:MASK\Mask\Hooks\PageLayoutViewDrawItem';
Hope this helps a little bit.
from mask_export.
Hi ayacoo,
Thank you for your post. As I wrote, I noticed this feature but to be honest I'm still wondering if the should really be a feature of the export. I tend to the opinion that this would generate to much (static) PHP which the user has to maintain.
from mask_export.
I understand you. Maybe this could be a additional feature for users who would like to have these preview? Maybe with a disclaimer for no guaranteed support? ;-) Of course a difficult topic :/
Or we amend the technical documentaion for these special case?
from mask_export.
I finally have a first small preview in branch https://github.com/CPS-IT/TYPO3-mask_export/tree/feature-add-preview-template This generates PHP und Fluid files if the option in the extension configuration is enabled. Would you mind to test that? Currently irre handling is still missing.
from mask_export.
Export was already good if i add "Classes" to my root composer.json autolaod section. Maybe this was my setup ;-)
#1218547409: MASKEXAMPLE\MaskExample\Hooks\PageLayoutViewDrawItem must implement interface TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface (More information) UnexpectedValueException thrown in file C:\xampp\htdocs\ff\vendor\typo3\cms\typo3\sysext\backend\Classes\View\PageLayoutView.php in line 1580.
Hint from https://wiki.typo3.org/Exception/CMS/1218547409 For version 8 the hook call changes.
I had only build a backend preview for one mask module, but you build automatically for every mask module. Was that your goal? I try to understand the exporter: You build own templates and don't copy the originals from my setted path, right?
Thanks for your good work and fast implementation :-)
from mask_export.
I don't find any problem with the hook. Would you mind to post the generated file together with an information about your TYPO3 version and your mask.json?
from mask_export.
Yes, as I have to export own Fluid code, I want to make that export for each content element. The user can do his/her adjustments later on. Normally the use case for me would be to design elements in mask, export those to an own extension and do further changes in the export.
from mask_export.
Okay i try to explain: I use a local system in composer mode and upload the generated "mask_example". After click an "Page" your Hook was enabled. He can't find the hook because of the non existing autoload information for "mask_example". Mayve your tool could later export a composer.jon? But this is another topic ;-)
Your feature in this feature branch works great :-)
from mask_export.
I okay I see. The problem is still with existing composer.json the information would be missing as long as you just upload the extension ;-)
from mask_export.
Hi Nicole,
I tested your feature branch as well with different mask elements and it works great.
Irre handling would be very nice, especially that it would make it possible to show thumbnails in the backend preview of the images from the element. I think this would help the typo3 editors to recognise an element more quickly.
Thanks for your great work :)
from mask_export.
Thank you both for your support and testing. I pushed an update of that branch that also supports inline elements. Please make sure to render new fluid templates. Hopefully for the first usage the example code is self explaining. Otherwise just ask :-)
I would be really happy if you could test that new feature as well. I have to do some further clean up and then this is ready to be released.
from mask_export.
Generation with irre elements works good, as always ;-)
Short question: You add colPos 999 for mask nested content, but i get the error "Wert ist nicht erlaubt". Masks amend the colpos with itemsProcFunc. Maybe we must add this colPos, too? What is your suggestion?
tl;dr: In my opinion the feature is ready if the colpos 999 is only my problem ;-)
from mask_export.
Hi ayacoo,
I'm not quite sure what you are talking about ;-) Can you explain where the 999 colPos from mask is used? And is this related to the backend preview or is this a new issue?
Thank you.
from mask_export.
Heyho :-)
I try to explain ;-) I create a mask element with an option "Content" and link to another Mask Element (IRRE functionality) And i have three columns at the backend layout, too.
You can see it here: https://picload.org/image/rdwopggo/mask.png
After the export i deinstall mask and install your mask_example extension with all mask elements and get this output: https://picload.org/image/rdwopgro/mask2.png
Hint: Backend preview works fine, but i dont know if this bug(?) comes with the new functionality.
I hope this was a better report.
from mask_export.
Hi ayacoo,
Thank you for your explanation. I submit this is an issue, but it's not related to the backend preview. Would you mind to open a new issue for that?
from mask_export.
I finished the work on that feature now. Would you mind to test the backend preview again. If verified by at least one of you, I will merge this feature and prepare a new release.
from mask_export.
I test it again. Backend Generator works in principle correct.
Some trouble build with for loops: In mask_export\Classes\CodeGenerator\BackendFluidCodeGenerator.php the for loop should generate an if condition because mask generate an '' default value for objects (like fal images).
You can test it with a simple image field.
PS: Awesome job :)
from mask_export.
Hi ayacoo,
Thanks for your report. Have you noticed that the incoming variables of fluid are not related to mask and the generated templates are specific for the export?
I'm not fully able to reproduce your problem. Can you please give me some extra explanation?
Thank you!
from mask_export.
After the export i deinstall mask, install mask_example and add this image element without content on a simple page. The error message is only visible in debug mode.
If i change the fluid backend template of this element with an if condition then all is fine. The problem based on my typo3 settings, maybe this is not relevant enough for your feature.
from mask_export.
Hi ayacoo,
Thanks for your comment. The error indeed popped up due a an error in the PageLayoutViewDrawItem class. However after fixing this I decided to wrap the fields with an if-statement to prevent empty properties.
from mask_export.
I'm going to release a new version next Monday. I will then merge this feature and close the ticket. Thank you for your help.
from mask_export.
Related Issues (20)
- using use in ext_tables.php - maybe a hint HOT 7
- "Path to icon for irre elements" not in export HOT 1
- Update to Mask 7 HOT 4
- Export element to extension and use it standalone HOT 1
- Inline content elements shown as unused in page layout view HOT 2
- MASK 7 Update ??? HOT 2
- Support of PHP 8+ HOT 2
- Trim provided extension key
- Can't overwrite Backend Preview HOT 6
- Palette inside Tab not working HOT 1
- DB-Import for nested elements fails due to missing default-value of parentid.
- Error: Row size too large... because of doubled rows in database HOT 1
- LLL-String not working if the word "mask" is inside of the String
- Error "Array to string conversion"
- Repo's packages are not installable HOT 1
- Allow multiple partialRootPaths HOT 1
- TYPO3 12 compatibility / ExtensionUtility::registerModule()
- Strange segmentation fault (SIGSEGV) inside DDEV Context (502) HOT 1
- Mask 8 and TYPO3 12 HOT 4
- Version handling in composer.json HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mask_export.