Jump to content

Ivan Gretsky

Members
  • Posts

    1,523
  • Joined

  • Last visited

  • Days Won

    16

Posts posted by Ivan Gretsky

  1. What I was thinking about is PW image field creates variations of image (scaled down, resized and so on). And it does so not on image load, but during render. @maximus, you surely know about this. And PW puts all those into the same folder for all image fields of the same page. So I was wondering if and how this field handles those cases. I guess it does not as it is file field, not image. Or am I wrong?

  2. Thanks, @teppo!

    This is cool reminder about the Wireframe::page() function. This is super useful to render repeaters as part of another page.

    I am rendering RepeaterMatrix page for a login (another take on this one). So I was hoping to create a controller and set of views for a RM page to separate the logiс. I cannot use a dedicated page for this.

    I am wondering, maybe there is a way to render custom content Wireframe way without being tied to a page? I am in a PageRender hook trying to change the output for the unauthorized. Would like to render custom view in a custom layout without a page (and a template). Now I try to have this stuff in another template's controller in a url segment handler. But this doesn't feel right)

  3. Thanks Iskender!

    But that is not exactly what I am after. I need to render a page Page::renderPage hook and replace the output with another page render.

    wire()->addHookBefore('Page::renderPage', function (HookEvent $event) {
    
    	/* CONDITIONS CHECKING */
    
    	$event->removeHook(null); // Remove this hook so we do not get caught up in a loop. See https://processwire.com/api/ref/wire/remove-hook/			
    	$someOtherPage = wire()->pages->get(...); // Get the page to be rendered instead of the current one
    
    	$event->return = $someOtherPage->render(); // HERE I NEED TO RENDER A PAGE OTPUT FOR AN URL SEGMENT INSTEAD OF REGULAR RENDER
    
    	$event->replace = true;
    
    	...

     

  4. On 10/2/2013 at 2:08 PM, marco said:
        $page = $parentEvent->object;

    Good day, whoever needs this years later)

    This trick for hook is obsolete after the newly introduces Page::renderPage hook (see here).

    That is great, but it does break the old way of getting page with the line quoted above.

    Change the code to something like this:

    wire()->addHookBefore('Page::renderPage', function (HookEvent $event) {
    	$page = $event->object;
    	...

     

    • Like 4
  5. Good day @ryan!

    After the launch of the redesigned admin theme and site I had private conversations with some community members about it. And I have to say that they were pretty harsh about it. Some of us are choosing words here in the forums keeping hard thoughts to ourselves. Was it the right move? Was it made with enough consideration? Didn't it cost too much breaking things that worked? Is it possible to rollback somehow? This is what at least some of us here are silently thinking. 

    Ryan, a lot of us here like myself have always relied on your vision and gut. You have managed to deliver exactly what was needed so many times. We want to believe the redesign is the right move too and we are just are too accustomed to the familiar and struggling to change opinions...

    So let me ask this. You see the google analytics metrics, downloads and stuff. Maybe you can measure something else like forums activity rate. How did it change with the redesign? Did you get what you expected?

    • Like 4
    • Thanks 1
  6. Good morning everyone! Congratulations with the new look! This redesign effort is something we've been waiting for a long time!

    I am reading the new site from mobile and I rediscover a lot of great content I forgot existed. I think the navigation logic is improved greatly.

    Surely, there are visible bugs and glitches here and there. And I didn't see the new site from the desktop yet. But new look is modern and cool.

    I remember getting used to the last redesign. It was a pain. We as people have hard times seeing something we love change. But the world has to move on) And I am pretty sure here it is for the good!

    Another amazing thing is that an international community-driven team of volunteers has been working on a redesign. This is so cool and I hope to see more of such for PW in every aspect of its development (like in fixing those bugs and glitches)). Great thanks to the volunteers!

    • Like 2
  7. Great!

    I was waiting for this moment since the times stars were not yet rounded in k's))

    Congrats, everyone! But I still want to encourage everyone reading this go and check it their  is there and properly counted. And add it if not. We are heading for 2k))

  8. 4 minutes ago, kaz said:

    Using the page reference field, the list of pages which I don't want is not what I need.

    @kaz, pages in PW are just a storage mechanism. They are called pages historically, but are often used as nodes, data items etc. Using pages as values for selects is a recommended way to go in PW. So @virtualgadjo's advice is a great one and a best practice. So do not hesitate and use it.

    See the 1st sentence of the official docs here : "While we usually recommend using the Page Fieldtype for selectable options..."

    P.S. Please star ProcessWire on github!

  9. Good day, everybody!

    Sorry for not answering in this thread. Going through some not so easy times here. And working on this module is out of my reach for now. More to that the leaflet site is not even accessible from Russia (this is where I am at) as the lib author is in Ukraine. You can guess why.

    But maybe I have got a way around. Just maybe you noticed that the module repo is under the FriendsOfProcessWire organization. I was hoping to gather a team of PW loving devs under this org and support some important but abandoned modules there. This plan didn't work out (yet?) but we can try to make it work. If someone here in this topic feels willing and capable to take care of FieldtypeLeafletMapMarker (at least for a while), please write to me a PM and we will decide how to go on.

    I was always wishing a more productive community cooperation around PW and just maybe it is time))) 

    P.S. I am now out of town so might not answer quickly. But I will)

    • Like 1
×
×
  • Create New...