Jump to content

Stefanowitsch

Members
  • Posts

    326
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Stefanowitsch

  1. Ah that is a classic mistake I also made in the past. Page paths always have to end with a backslash in ProcessWire (but that is adjustable in the template settings!). When you call up an URL you can leave the backslash - this will work - but in that case theres a redirect going on that leads to the data-loss when submitting form data.
  2. I am stumbling over and over again over this issue and I really think this should be fixed, or at least the 'remove' option of the fixUnclosedTags() Function should be adjustable in the $sanitizer->truncate() method. @ryan
  3. Ah! That did the trick. Thank you! I now went from this: return "<div class='uk-navbar-dropdown'><ul class='uk-nav uk-navbar-dropdown-nav'>$output</ul></div>"; To this (also added the 'uk-drop' class as you mentioned). return "<div class='uk-navbar-dropdown uk-drop'><ul class='uk-nav uk-navbar-dropdown-nav'>$output</ul></div>"; Now I can use "defer" without having the flashy dropdown menus on page load. This is a trick I bet I want to try on some other UIkit components aswell, if they behave a little bit clunky.
  4. It seems you have more and more options nowadays to use everyday things. One thing I don't like about using the "defer" method (even it seems as the go-to method today) is that when you make use of frontend frameworks that manipulate the look of elements on your website this results in some ugly "jumping around of elements that are not aligned/styled yet because the script is waiting to be executed". I am using UIkit and when using "defer" on the uikit.min.js file it will execute after the HTML is parsed. So for a few milliseconds on page load you can see some of the dropdown menus visible in the main navigation for example. That is because I make use of the uk-navbar component, which relies on the uikit.min.js file: uk-navbar="align: center; animation: uk-animation-slide-top-small; animate-out: true" When loading the script the normal way (no defer or async) you see no dropdown menu at all when the page is loaded. Because then the script is executed before all of the page is loaded. I think even when there are best-practices how to to stuff you always should check what is more important for your project. Having a consistent look or save a few fractions of some milliseconds on loading time.
  5. For me personally I see RockFrontend as a tool for development. Not a frontend framework. The main reasons why I am using RockFrontend are: - Auto Refresh - Make use of the rfGrow Feature for fluid font sizes & Handling Assets: - Auto compile LESS to CSS - Minify CSS and JS Files I know that there are already some JS-Snippets included (like rf-scrollclass) but I it's too tempting to start in including more and more Frontend Framework features. I personally use only a fraction of what RockFrontend offers and it's hard keeping track because new features arrive continuously ? If more and more frontend framework features will be included at some point in the future you have to decide wether RockFrontend will evolve into it's own frontend framework, shipping scripts and styles for everyday usages.
  6. As far as I know (and I haven't used this feature yet!) this should be possible (found here: https://processwire.com/modules/rock-frontend/) You can make use of the addIf() function to load a script only under special circumstances. Adding assets to your site (JS or CSS) While you can always add custom <script> or <link> tags to your site's markup it is recommended that you use RockFrontend's AssetsArray feature: $rockfrontend->scripts() ->add('/path/to/your/script.js') // you can add any custom flags to your $rockfrontend variable at runtime! ->addIf('/path/to/foo.js', $rockfrontend->needsFooScript) ->addIf('/path/to/slider.js', $page instanceof HomePage) ->addIf('/path/to/blogscript.js', $page->template == 'blogitem') ; $rockfrontend->styles() ->add(...) ->addIf(...) ; There are several reasons why this is preferable over adding custom script/style tags: addIf() keeps your markup file cleaner than using if / echo / endif It automatically adds timestamps of files for cache busting You can inject scripts/styles from within other files (eg PW modules) RockFrontend itself uses this technique to inject the styles and scripts necessary for frontend editing (ALFRED). Have a look at the module's init() method!
  7. Thank you for your honest response! I am still interested in getting started with Padloper 2 and I guess I will try it out in the next project. When do you plan to update the docs or release the video documentation? Both would be really great ?
  8. Hello there! After using Padloper 1 for a project I want to look at Version 2 for a new project. I know that Padloper 2 is entirely re-written and despite the name has nothing to to with the original version, am I right? So I can't really build upon my experience with the original Padloper 1. I am a bit confused on how to get started with Padloper 2. I found that there is an official documentation available: https://docs.kongondo.com/ This Docs go through the installation process but then it kind of stops. I would like to have further - basic - information like: - How to create Categories and Products in the backend - How to handle product field data (like custom attributes, variatons, etc.) - What fields are required for the product templates (price, amount, etc.) ? - Does Padloper create these fields in the installation process for me or do I have to do it manually? Basically what I love to read would be a "how to set up a simple shop with categories and products step by step". It looks like the "Frontend" section of the documentation should handle all this, but there is almost nothing to find? The only thing that is shown there is a kind of "category overview" page: https://docs.kongondo.com/frontend.html Maybe I am missing something but the Docs do not tell me how to set up the shop (I mean creating categories and adding products) besides from the installation process and the shop settings: https://docs.kongondo.com/start/ Then theres the Demo repos on GitHub which handle different Padloper shop variants with different features: https://github.com/kongondo/Padloper2Starter As far as I see there you have to install these demos manually and search through the templates and source code by yourself to see "how things are done". I find this a bit irritating, isn't the Documentation supposed to support this kind of information? For Demo 1 it says: It is a complete demonstration of a Padloper shop frontend including products and categories/collections display, single product display, add products to checkout and checkout process. It utilises htmx and alpine.js in various places including checkout. It uses an ajax-powered checkout via htmx. This means ajax responses are htm It would be great if a database-dump would be included which supports the demo with an already existing page tree with the demo categories and demo product pages to see how things are configured in the backend. The Padloper2Starter Readme says that these template files have to be created manually: You need to create a products and a categories page under your root page (home). They should use the similarly named templates respectively. The template files for above pages are: /templates/products.php -> for all or single product. /templates/categories.php -> for all or single category. Then again I am wondering what fields to I have to add to those templates in the first place to make the Demo work? Thanks in advance ?
  9. I love the text-reveal animation for the headlines. Really neat! How did you approach this feature? It seems that every letter in the headline text gets wrapped inside a <span> element via JavaScript and is then animated via CSS transforms?
  10. Just for interest: This module is working for me on PW Version 3.0.213.
  11. It is still possible to delete a page that has children from the settings tab, yes. But here is no "trash" short-icon in the page tree for the same page.
  12. Absolutely. That makes it possible to delete Pages - as long as they have no children.
  13. For a website I created a new role - editor. This is a role for users that are only allowed to edit, view, create and delete pages. Very basic stuff! Everything works, except the "move to trash" option is never shown in the page tree. I have granted the "page-delete" right to the user role but it has no effect. What am I missing? Here's what the 'editor' role is configured.
  14. I am wondering what would be the best workflow to handle (for example) file downloads inside textfields which make use of the TinyMCE. Imagine having a text and somewhere inside the text you want to offer a download link for a PDF document. Nothing special so far. This is no problem as far as the PDF file you want to download is uploaded somewhere in the system in the first place. That means the page you are editing which contains the text field usually does not have a file field for uploading content. This is often the case when working with repeater matrix fields. You just get the blank text field in that case. So in order to make the file download working it seems you always have to make a "global file download list" field on a separate page (maybe a "settings" or "downloads" page) and first upload the file there. Then you can chose that file from the textfield. Having in mind that technically not so experienced users who edit the website might use this workflow seems not ideal. If you want to link to a file you should be able to upload the file directly in the popup window instead of selecting "chose file from page".
  15. Always interesting how people approach ways to create and manage content in ProcessWire in so many creative and different ways. For handling and sorting different content sections on a page the Repeater Matrix was my go-to module in the past. Nowadays I use the RockPageBuilder from @bernhard which is far better in my opinion ?
  16. To use background images I use the following plugins: 1. Lazysizes: https://github.com/aFarkas/lazysizes 2. The Lazysizes bgset extension: https://github.com/aFarkas/lazysizes/tree/gh-pages/plugins/bgset Note: The bgset extension must be loaded before the Lazysizes plugin. That's why I disabled the "Use Lazy Loading" in the module settings and load both files above manually in the correct order. To make use of a background image this code here works for me: <div class="img-title-wrapper lazyload" data-sizes="auto" data-bgset="<?php echo $image->size($imgFormat)->srcset() ?>"> /* your content */ </div>
  17. Thanks! I found out you can change the label text for the page reference field in the field settings itself.
  18. Wow, it does indeed work! All you have to to is 1. Create a page reference field 2. Select the parent page in the field settings (which is the repeater page in that case, hidden under the admin site in the page tree!) 3. Now you can select the repeater items from there like a page reference The only drawback is that this list shows the programmatic created names that are used for the repeater item pages by the system. THIS can be solved by changing the label in the field settings:
  19. Hi have a general question if this would be possible: I have a page that contains a repeater. This repeater holds an image and a cite for each repeater item. On the page itself all repeater items (= all cites) should be visible in a carousel. But on other pages I would like to select a specific single (!) cite from that repeater to be shown. This cite should be selectable from a list, not just hard coded as a ProcessWire selector with the ID of the repeater item... I know that this could be achieved with a page reference field. But in that case I can't make use of the repeater field but instead have to create a subpage for each cite I want to add. The repeater solution seems to be more straight forward.
  20. I have the need to change the text colors in a TinyMCE field. There seems to be a plugin available for this case: https://www.tiny.cloud/docs-4x/plugins/textcolor/ But in the field settings this plugin option is missing: What could be a workaround for this? SOLVED: The documentation link was for version 4... in the current version 6 you have to insert the "forecolor" setting into the toolbar. That's it!
  21. @joshua Great! Thank you very much for the fast and simple solution.
  22. Yes I have to observe it some new bugs will appear. I don't even know why fastclick solves this issue, maybe it would be enough to find out that little piece of code inside this library that does the trick and just extract hat.
  23. If anyone is looking for a workaround: Using JS fastclick solves this issue for me. This seems to be an iOS related problem. If you google for "iOS double tap link issue" you'll find plenty of threads. Mostly they have to do with CSS hover pseudo elements but this was not the case here.
  24. It would be a very useful feature. Setting up PrivacyWire from ground up is a bit of work and not all my sites need it. It would be easier to be able to switch it on/off depending on the clients needs.
×
×
  • Create New...