-
Posts
77 -
Joined
-
Last visited
Everything posted by Robert Zelník
-
InputfieldURL: link: Note that "http://" was added
Robert Zelník replied to Robert Zelník's topic in Wishlist & Roadmap
@horst thank you for your answer. What you write makes sense. Currently I am building a list of website URLs for one ProcessWire-based project. I will observe how many of them will work with http-to-https redirect and if there are some websites that will fail in this way of redirection. -
I opened an issue on Github for this.
-
I just installed all the Webmention modules (version 2.0.0) on ProcessWire 3.0.164. It looks like everything is installed well. I created the field for webmentions and added it to the template. It returns this error message in Modules.php on line 3420: Exception has occurred. ReflectionException: Class\ProcessWire\FieldtypeWebmentions does not exist The template returns this: Fatal error: Uncaught Error: Call to a member function render() on null in /var/www/.../processwire/site/templates/micropost.php on line 25 My template looks like this: <?php namespace ProcessWire; ?> ... <?= $page->body ?> ... <?= $page->Webmentions->render(); ?>
-
It works as expected, thank you for all your solutions.
-
Let me explain my use case: I would like to create a photo gallery where the newly added images are placed on the top. There are two ways how to show newly added images on the top of the list in the frontend: 1. template renders the images in reverse order, or 2. web site admin moves all the added images manually from the bottom to the top of the list. Both ways are unintuitive. I like the Children > Sort Children setting that allows to change the order of child pages in the backend. It would be useful to have a similar feature in the images field. Is there any other way how to sort images in reverse order (new images on the top) and see them in the same order in both frontend and backend?
-
Is there any way how to set the order of images in the backend editing so that the last added image would be placed at the top of the list instead of the bottom?
-
I no longer maintain the Slovak translation for ProcessWire. It is a Github repository, so you can easily clone it, update it and post a link to your updated version here.
-
A different way of using templates / delegate approach
Robert Zelník replied to Soma's topic in API & Templates
Yes, both approaches does exactly this using PHP. My suggestion is targeted to PW core developers to rethink the "Alternate Template Filename" option to take care of both layout and view, without the need of additional PHP code in the template files. -
A different way of using templates / delegate approach
Robert Zelník replied to Soma's topic in API & Templates
Yes, exactly. It's a similar approach done differently. I just think that it would be great if PW would allow to set both layout and view files in the template settings. Currently we can just set the layout file (in Advanced > Alternate Template Filename). -
A different way of using templates / delegate approach
Robert Zelník replied to Soma's topic in API & Templates
Back to the Soma's template approach: I just realized that we would not need to use dirty hacks to force PW to render alternate template file, if PW would allow us to set template files for both layout and particular view. Example: We have a post template. In post template we set main.php for layout (default setting for the whole site) - renders the whole HTML page post.php for view (default setting for this particular template - derived from the template name) - renders the content specific to the post template, nested inside the main.php layout This approach is common in many web application frameworks. -
I would like to set a custom default/starting page inside the page hierarchy instead of the root page. Is it possible, or should I create a redirect from the home page? Could the home page be inside a second level of the page tree?
-
Is there any way to sort file/image field content?
Robert Zelník replied to Robert Zelník's topic in API & Templates
Yes, that's it, it works well. Thanks... -
I would like to create a simple image gallery using simple image field with multiple images per page. I would like to show them sorted (newest first). I have tried this: $images = $page->images->find("sort=-id"); foreach ($images as $image): ... endforeach; It works well with child pages, but it seems like it doesn't work with image fields. Is there any way to sort these images, or should I use repeatable fields instead?
-
I really like the translation interface. I just have some difficulties with reading the output files exported from the ProcessWire Languages interface. Currently the .json files look like this: the whole file is stored in a single line non-ascii/accented characters are encoded in \uXXXX format This makes the translation file hard to read for human beings. Could be possible to implement line-wrapping and storing the text in UTF-8? I have read that UTF-8 is preferred for JSON files and I assume that the appropriate line endings would not make the file hard to read for the application.
-
Maybe it would be easier to add some script to generate that file list on demand. In that case it would not be necessary to maintain the package manually.
-
What about creating a wiki-section on ProcessWire.com to allow collective maintenance of this file list? Several time I thought it would be good to have a wiki also for users' contributions to the documentation and many other reasons.
-
Thanks Antti.
-
I am starting an initiative for Slovak translation of ProcessWire. Any participants are welcome. https://github.com/rzelnik/ProcessWire-Slovak-Language-Pack
-
What should I do when I would like to start a new Language Pack? Could you please publish some HowTo?
-
The field types File and Image have Description fields. These fields should also be translatable.