Jump to content

Ivan Gretsky

Members
  • Posts

    1,407
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by Ivan Gretsky

  1. On 2/5/2024 at 6:51 PM, hellomoto said:

    Are URL segments indexable & search engine optimizable? Site-mappable?

    As it is all urls and html content at the end the answer is yes to all of those questions. The difference is that you don't get a unique page object for a urlSegment as you do for a regular page. The urlSegment can show data from some other page though (as you mentioned).

    You need to code all this. And there might be only a little or a lot of code. You need to start solving tasks one by one to find out all the answers.

    On 2/5/2024 at 6:51 PM, hellomoto said:

    I don't know how to test this locally.

    I do not see any difference where to test it at. Surely, most of the time it is done in some sort of a test env. Locally is totally fine. But maybe there is some sort of a limitation at your external data provider. If so, elaborate on this and we will answer in more detail.

    • Like 1
  2. Thanks, @ryan!

    Being here for so many years it feels like home. And everyone in the forums like relatives, even though I never seen them in person and only imagine them as their avatars living somewhere around the globe) So these "winter holidays" celebration posts are kind of like a family reunion, when everybody gathers at a holiday table after a not so easy year passed.

    Happy new year to everyone! Let it be a better one!

    С наступающим! Всего хорошего и доброго! 🎄🎉🎅

    • Like 9
  3. On 10/27/2023 at 12:55 PM, Roych said:

    Maybe something like this?

    $menuBuilder = $this->modules->get('MarkupMenuBuilder');
    $menu = $this->pages->get($id);
    
    if ($menu->menu_items->count()) {
        $this->menuItems = $menuBuilder->getMenuItems($id);
    } else {
        // Handle the case where there are no menu items, for example:
        $this->menuItems = []; // or any other appropriate action
    }

    Haven't tested!

    This code (should) first checks if there are any menu items by using the count() method on the menu_items field. If there are menu items, it proceeds to fetch and assign them using the getMenuItems method from the MenuBuilder module. If there are no items, you can handle it as needed. In the example above, an empty array is assigned to $this->menuItems, but you can customize it to match your specific requirements.

    This approach allows you to use the MenuBuilder module to create menus with or without items, without triggering the error you mentioned.

    Cheers,

    R

    @Roych, as I can see from his post @Clarity is already doing almost the same as you suggested. But he is looking for a cleaner way to handle it that already exist (or asks @kongondoto update the module to provide it).

    • Like 1
  4. Hey, @teppo! Hope you're doing fine!

    I've been using Wireframe for a while without too much thought just relying on it. Thank you for this module! It really helps with structuring PW projects.

    Once upon a time I've borrowed your convention to put all the static files to site/templates/static folder. I am putting both sources and generates stuff there. I've handled the build process with VS Code plugins to get rid of the node based build chain. Anyways, now I see that you recommend creating two other folders: site/templates/resources and site/assets/dist. I can guess that you renamed static to resources and probably added assets/dist for the generated files. But could you please describe how you suggest using all these folders in the Wireframe-based workflow for building and maintaining sites in a little more depth. Couldn't find any docs on this. Maybe there are some useful methods and/or settings that can make use of these? How do you use them?

  5. @Clarity, Combo is a 1st party Pro field and it seems to be not supported out of the box with Rock Migrations. I think that only Repeater Matrix field is supported of all Ryan's Pro fields thanks to @gebeer's work. Those Pro fields all need special treatment and you can't expect them to work with just createField().

    But you can always fall back to just raw ProcessWire api and create the Combo field with just that. See here how to do it if you got Pro fields support board access. If you don't, here is the code Ryan suggested (hope this is alright to post it here):

    image.thumb.png.a27f4dfbfd995d0fc12b3d6f3bafb778.png

    You can make a special method for Rock Migrations out of this (should be pretty easy if this code works) and make a PR if you want it there))

    • Like 1
    • Thanks 1
  6. Good day, all the super clever RockMigrations users!

    I am just starting to get my head around this super module. I've got what seem like a bug when using installModule() method. As the title says installModule() does not actually install the module when run the 1st time, but only downloads it. When the method is run the 2nd time, the module is actually installed, but not until then. I've already created the github issue, but double posting it here to find out if someone else is facing the same issue. Seems to be an critical one. Just want to make sure it is reproducible.

    • Like 1
  7. Good day @bernhard!

    I was testing @gebeer's PR (see this thread), and I was looking at the code of RockMigrations.module.php. It seems to me that it might be beneficial for supporting this long-time to split the code into submodules. I think that all the code that actually creates fields/templates/users... could be moved to a helper module(s). And the main one would deal with all the admin logic. This way it would be not only easier to add field-specific methods, but also possible to use those great methods in different types of workflows (including them).  I would love to see other Pro fileds' specific methods added. Maybe other commercial or just 3rd party modules too. Maybe there could be some plugin system for those?

    • Like 3
×
×
  • Create New...