Jump to content

Stefanowitsch

Members
  • Posts

    387
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Stefanowitsch

  1. I've implemented an ajax-driven auto complete search on a website and I am wondering if you should use the CSRF check on this one or if this would be a bit "over the top"? More information: https://processwire.com/api/ref/session/c-s-r-f/
  2. I like to re-use most of the fields. For example in most projects i have one body field, one headline field and one (single) image field. With fieldsets I can reuse these fields as often an as much on a single template as I want. As long as the field settings not differ that much there is no use to create a "body2" or "body3" field. BUT if you need to alter the field settings in one case it is possible to override these changes on a fieldset-basis. For example I have this fieldset here with two generic input fields: A single image field and a body copy field. These are generic fields that I use all over the place. If I want to make slight changes to those fields in the context of the fieldset I can edit the fieldset and then click on the name of one of the fields inside it. This will open a dialogue where you can override very basic field settings. It is in most cases not possible to customize a field very much this way. For example you can't change the width and height cropping properties on an image field.
  3. After upgrading the PW Version to the latest master version 3.0.227 I get the message that there are two versions of the TinyMCE installed: This is because before the TinyMCE was officially a part of the PW core I installed it manually. My question is: Is it "safe" to just delete the module folder of the manually installed version that lives in the /site/modules folder? I want to make use of the core version from now on.
  4. Yeah I had the pleasure to be one of the earliest customers who uses this module and already made a few websites with it. Once it's released I will give some insight here in the board how I created this and that with it. It's a really powerful tool!
  5. Hello! I know exactly what you are meaning. Well you have at least three possibilites: 1. Use the Fieldset Page in ProcessWire. With this you can combine fields into one Fieldset. I don't use this Fielset anmyore but if I remember correct you have to install it from the "Core Modules Tab" (under: /processwire/module/). You create a new field (name it for example fieldset_introduction) and then you add fields to it that you want to make use of (cool thing: you can reuse this fields in all other fieldset page fields and don't have to create a "body copy field" for each and everyone of them separetely!) And here is what it looks like on a page template. The fields shown above are aligned in a fieldset named "Introduction". You can add several Fieldsets this way and just put them in any order on your page template. 2. Use the Repeater Matrix Pro Field. This ones commercial but it makes handling and editing Sections on your pages much easier and more flexible! Cool thing is that you can define your content blocks in the field settngs and add the needed fields right there. Then on your page template you can select the type of content block (or name it section): After that it's super easy and comfortable to edit these sections and also change their order! 3. Use a third party page builder module like the RockPageBuilder from @bernhard. This module even beats the popular Repeater Matrix module in my opinion as it accelerates the creation and editing (and managing!) of content massively! Even better, it kind of combines the Repeater Matrix block-buidling functions with frontend editing which is a massive leap forward in terms of workflow optimization and customer happiness (cause it is also very easy to use for non-technically experienced users!).
  6. Truly an inspiring project! The technical solutions here are fascinating. I haven't touched a project with a custom backend for users (yet!) and I always wondered how to approach it.
  7. I now changed Line 322 in InputfieldImageMarker.module from $addInfoPages = $modules->get('InputfieldAsmSelect'); foreach($opts as $opt) $addInfoPages->addOption($opt->id, $opt->title); to: $addInfoPages = $modules->get('InputfieldAsmSelect'); foreach($opts as $opt) $addInfoPages->addOption($opt->id, $opt->headline); Now the headline is shown as title in the select field: But the bummer is: It turns out that this field does not work properly inside a repeater matrix. The table with the marker coordinates never shows up after saving ?
  8. Ah sorry, my bad! This is not what I meant. I want to make the headline field of the repeater item pages shown in my screenshot to be listed in the AsmSelect Inputfield of the Image Marker Field. Right now this AsmSelect Field is only showing the page ID's of the repeater item pages: I don't know if this is even possible via hook.
  9. That's an interesting approach. The repeater items are located here in this case (rep_stories), how would I hook into the title rendering function in this case?
  10. I am in the need of using this module in a current project ? Turns out it works just as fine as I could ever wish! Except one thing: I want to make use of Repater Field Items as selectable pages only. So I added this line of code in the field settings. The page ID in this case is my repeater field that contains the child elements (=pages) that I want to be able to select. This works but unfortunately I see only the page IDs in the AsmSelect Inputfield as labels: I know that there is a setting for the AsmSelect to tell which field to use for the label: BUT since the AsmSelect in the ImageMarker module is generated via API code it is not possible to adjust this setting. @kongondo can you help me out on this one? it is somehow possible to tell the AsmSelect which field to use as a label?
  11. 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.
  12. 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
  13. 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.
  14. 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.
  15. 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.
  16. 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!
  17. 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 ?
  18. 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 ?
  19. 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?
  20. Just for interest: This module is working for me on PW Version 3.0.213.
  21. 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.
  22. Absolutely. That makes it possible to delete Pages - as long as they have no children.
  23. 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.
  24. 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".
×
×
  • Create New...