Jump to content

maetmar

Members
  • Posts

    39
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

maetmar's Achievements

Jr. Member

Jr. Member (3/6)

15

Reputation

  1. Hi @bernhard, I realized that RockFrontend is adding "<div edit=title hidden>title</div>" before the closing body tag, because of line 260 in RockFrontend.module.php (faketag) Is this used for Alfred? And if yes, is there a way to only output this if Alfred is actually used? Thanks for checking
  2. Hi, I have two users. One is an admin (myself) and then a "normal" user, which is my customer using the backend to edit content. In my templates, I have one field "layout_options", which is from type "select options" where I can toggle with checkboxes the visibility of some other fields (headlines, texts, images, etc.). On those other fields I, which I want to toogle with this switch, I simply use this feature described here: https://processwire.com/docs/fields/dependencies/ This all works fine and looks like the following screenshot. I actually use this to prepare the available elements in a repeater matrix block and I also use it in the template files to check if a specific layout option should be dispalyed or not. Later the actual content should be entered by the user, who is not an admin. To avoid that the user changes the "layout options", I want to hide or better just make this "layout_options" field "read-only" for the normal user. This is to prevent he is messing around with the layouts and add stuff, which he is not supposed to do. It also works to do this by using the respsective settings in the access control of the field "layout_options". However, and now I come to my issue, when I do this and hide it or make it read-only, then also the field dependencies donΒ΄t work properly anymore - see below: I played around with all settings in the access control for the field "layout options", but nothing works. Any idea how to solve this? thanks
  3. @bernhard, still the same behaviour. I get the error whenever I am not loged into the backend or I open whenever I open the page in an incognito browser window (tested with chrome). When I am loged in and view the frontend in another tab it works fine. I tried it on two different installations of processwire and both have the same behaviour. ItΒ΄s not a big issue, as I use livereload anyway only during develoment of a new site and it should anyway be turned off once the page is live.
  4. in a nutshell. if you are loged in in the backend as an admin then it works and otherwise you get the error message mentioned above.
  5. this is what I was able to find out, I hope it helps if an admin is loged in the backend and you have another tab open with the frontend --> no issue if an admin is loged in the backend and you have another inqognito window open with frontend --> error if no one is loged intp the backend and you have any session open with frontend --> error
  6. Hi @bernhard, I found an issue with the livereload feature. When enabled, I get the following error message in chrome development console: "EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection." https://stackoverflow.com/questions/53591954/eventsources-response-has-a-mime-type-text-html-that-is-not-text-event-str It is reproducable, as soon as livereload is turned off, the error message is gone. The message is not causing any issues, as far as I can tell, but I was spending now a lot of time just to find out it was caused by livereload. So maybe you can check and make sure it gets fixed.
  7. I got the Formbuilder working now with LATTE. Actually this works fine with latte: {$form} the problem was that I had to put this code into my _init.php: <?php $form = $forms->render('kontaktformular'); ?> in the documentation of the formbuilder it says put it in _init.php or on top of your template file. Firs, I put on top of my template file, which did not work, only after putting it into the _init.php it started producing output. But obviously also what Bernhard suggested worked fine.
  8. I know. My question was more in the direction if LATTE allows to execute somehow native PHP code. the LATTE tags "PHP" or "DO" donΒ΄t really seems to do the job, at least no output is generated when using those. I would like to avoid creating a new PHP file which I need to include, just to run one line of code.
  9. Now I want to add the first time the Formbuilder ProModule from Ryan together with RockFrontend latte files. One option to do this is normally you put these lines of code in your template: <?php echo $form->styles; ?> <?php echo $form->scripts; ?> <?php echo $form; ?> I somehow can not manage to get some output within a latte file. How do I properly run some PHP code within latte? I tried the below and nothing works / produces some output: {$form->scripts} {do $form->scripts} {php $form->scripts} using the tag "echo" is not allowed within latte, at least I get some exceptions. thanks again for any help / input
  10. sorrry but I am not a big help in debugging this. For now I will live with the extra |noesacpe filter. not nice but no show stopper for me.
  11. yes it worked before (Rockfrontend Version 2.1.11) without the noescape filters. When I upgrade to 2.7.1, I need to add them. there is a standard.php that has one line of code: <?= $rockfrontend->render('./standard.latte') ?> and the standard.latte looks like this now (the whole main body HTML content is rendered from ProField repater matrix): {$rockfrontend->render('includes/_head')|noescape} {$rockfrontend->render('includes/_header')|noescape} <!-- Render all Layout Blocks defined in page. Output derived from seperate output files --> {$rockfrontend->render($page->layout_blocks)|noescape} {$rockfrontend->render('includes/_footer')|noescape}
  12. adding "|noescape" fixed it. instead of: {$rockfrontend->render('includes/_head')} I used: {$rockfrontend->render('includes/_head')|noescape}
Γ—
Γ—
  • Create New...