-
Posts
1,510 -
Joined
-
Last visited
-
Days Won
16
Everything posted by Ivan Gretsky
-
There is no easy way I know of to do exactly what you're asking for. But as far as I understand the actual need is to find pages with selected templates. If you do not need to select the templates to be used in selector in admin, you should be able to hard-code the selector like this (see here for explanation): <?php $childChildren = $pages->find("template=template-a|template-b|template-c, sort=sort"); If you need to be able to select the templates in admin, you could add this module to some page, and then use it's value in a selector. Hope the module still works in current version of PW. There is an option to tag fields in admin and then use the tag instead of a list of fields in selectors. If the same thing worked for templates, that could be a good way to solve this task. But I did not find any docs on that, so you just might want give it a try first, and then fallback to the module if it's not possible.
-
Thanks, @ryan! Sometimes I think that ProcessWire is so mature and feature rich that only fixing the issues at hand can make it stand out even more than adding the new stuff (until the the stuff is added and I start thinking that I could not live without the features just added))) Thank you so much for keeping the right balance.
-
Just try it. I think it will work. I fixed my advice above a bit to make it more clear.
-
Aren't en and de just the titles names of corresponding language pages? So just change the name of the secondary language page to en.
-
Hey, @fruid! You can try this algorithm of actions: Export all the strings from German language. Import the exported German strings to default language, making it German. Remove all translations from the secondary language, making it untranslated => English. Maybe rename things here and there for the convenience. Change the name of the secondary page to en.
-
Hey, @strandoo! I think the trick is in the $options argument. Try something like this (or dig into the docs). $sanitizer->purify( $page->summary, array( 'CSS.AllowedProperties' => [] ) );
-
As for me, I always make separate templates for the ajax scripts. Something like ajaх-handler. This way I always get the API working right. I believe it is the recommended way to deal with this. Sorry for not answering the original question directly)
-
Yes. If you're doing simple foreach and not sorting items yourself.
- 1 reply
-
- 4
-
-
[solved] Issue using Toggle Fieldtype in selector for pagination
Ivan Gretsky replied to ottogal's topic in General Support
Check if the selector returns any results (echo $posts->count;). Looking here, it seems like you've set your field and selector right, but just maybe you have changed default state for the Toggle Inputfield after it has been created for your posts and it still holds the '' (empty string) value for the most of them if not all. You can look in the database to be sure.- 4 replies
-
- 2
-
-
- toggle fieldtype
- selector
-
(and 1 more)
Tagged with:
-
ImportPagesCSV add repeater field support? (got FieldtypePage)
Ivan Gretsky replied to hellomoto's topic in API & Templates
Good day, @hellomoto ! I seems kind of hard to map arbitrary amount of csv values to repeater item values. I am having hard time imagining how this could be done via GUI. Do you have an idea how this could be done universally UI-wise? ...But it is quite easy to do in a custom script. Looking at a piece of code you presented I am sure you can easily handle this ?. -
Good day! I got a strange issue with webp images on one server. The same image works fine on Firefox and does not show (though blinks for a momдnent when trying to open it) in Chrome. I did regenerate it without luck. Then installed Imagick sizer, regenerated - same thing. Same code works fine on local machine, generating images readable in both browsers (or serving them in correct way), so must be a server issue. But what could it be? Example image used on this page. Please help!
-
Hello, @ukyo! I absolutely love your module. And trying to incorporate it in my site-building workflow. I did install it without a problem and am using it for storing some output settings with great success) But today I found two (probably, related) bugs: I cannot create a new Page Reference field. I am getting this error: "Call to a member function getField() on null" (...\Mystique\FieldtypeMystique.module.php:71). I cannot view a list of pages with certain template (see the screenshot). The error message is the same. Do you understand what it is?
-
LoginRegister: No Password Reset Email
Ivan Gretsky replied to creativejay's topic in General Support
Just to make it clear. You are talking about this module? I never used it myself though) -
Super cool stuff, @Robin S! Your modules are always the thing you wanted to, but never managed to do) I understand it is for all Repeaters not for Repeater Matrix only. But when used with Repeater Matrix it would be useful to: limit the RM types for the 0 level; limit the available children for a type. Maybe it is too much. And would probably require hooks to implement anyway, so not so useful for easy management. But just wanted to get those ideas out of my head)
-
Thanks! But that is obviously not the case for me) Do you think we should try to change the situation by asking Ryan to add similar hookable methods to PageFrontEdit? Or does it seem impossible to implement anyway?
-
Good day, @Robin S! I've just read through the whole forum thread and found out a lot of great things about this module. It is great and way more powerful than I could imagine! But the issue I was hoping to resolve wasn't there. I am trying to use the module in a frontend-edit context, but it doesn't seem to work. The Insert Hanna Code button isn't even in the toolbox. What am I doing wrong? Can I make it work here?
-
Hey @JeevanisM! You probably shouldn't override the core module, as all the good men stated above. But it's nice to know you can (and I actually did this before exactly with Comments field - hope it is easier to customize it now).
-
Go here and star the repo) P.S. And, of course, keep the love to ProcessWire always burning deep in you heart. But do star the repo too, to make your inner feelings make a a change in the world!
-
Module HelperFieldLinks - field and template edit shortcuts
Ivan Gretsky replied to Soma's topic in Modules/Plugins
Good day @Soma! Great module! I've been using it forever and can't live without it. When I login to any site without it installed, I feel kind of helpless for a while) My problem is it does not show the link for the RepeaterMatrix fields. Not an error like in the post above, but nothing at all. Could you please check? Created a github issue for this too. Edit: Sorry for incomplete report. The link is there, when all the items are collapsed. But if the "Remember, which repeater items are open?" option is checked, and one of the items is expanded on page load, the link is gone. -
Possibility of running a website/webapp inside Android Phone
Ivan Gretsky replied to JeevanisM's topic in Dev Talk
Good day! One way could be to include all videos in the mobile app installation package, so all the content is downloaded when the app is installed. I am not sure it is possible, or if there is a restriction on what you can put in the installation package and the size of the app, if distributed with the official stores. But that would be not a PWA thing, but rather a native app. The other would be to allow to download (cache) just the videos you need from the list in the app. So you install the app and then download the ones you need, while still "have the Internet". This should be available in PWAs as well as in native apps. But anyway, there must be problems with caching Youtube videos you're using. I would expect problems caching those. -
Resilienz-Kongress - an online summit / conference
Ivan Gretsky replied to joshua's topic in Showcase
I am using rsync to copy files between local and prod envs. Making an automation script was sitting in my todo list for way too long. So eagerly waiting for the sequel) -
Resilienz-Kongress - an online summit / conference
Ivan Gretsky replied to joshua's topic in Showcase
The read is as cool as the site @joshua! Could you share some more details (and maybe even code) about this: and this: -
Display list page references (Disable select)
Ivan Gretsky replied to flash's topic in General Support
As I get it, you just want to show a list of some pages in the page edit screen, without the need to interact with them. I think you need not use Page Reference field for that, but something like RuntimeMarkup.- 2 replies
-
- 2
-
-
- reference page
- list
-
(and 2 more)
Tagged with:
-
Great job! With the time you start appreciating such things as robust and maintainable core as much if not more than some shiny new features) And doing it little by little is surely better than a death by rewrite) Way to go, @ryan! And I'm sure you'll fix a lot of bugs by the way in addition to make a few new ones)