Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by alejandro

  1. This seems great.

    About a year ago I left PW to retake the WordPress route. I really love PW but I am a designer and I found myself spending more and more time around code, not just HTML or CSS, but PHP and JS, which is interesting to just a certain amount for me. I even developed some kind of blocks using repeater fields but I am no developer, at all, and it was messy. In WP you can find, as you all know, all sorts of builders and plugins and services, so you can be a web designer and create almost anything barely touching any code. But then you find something that should be easy, for example a grid of custom post with custom fields, and it becomes rather comples and/or expensive. Then I miss PW so much, all things pages, so easy.

    Please dont consider this comment another rant PW vs WP, just a bit my background, I hope useful in this thread.

    I think a module like this could greatly expand PW user base (don´t know if this is needed) beyond what I think is mostly developer users.


    • Like 1
  2. Anyway, it can be done in the render page with:

    foreach ($page->blocks as $block) {
    	if (in_array($block->template->id, ['77','79'])) {
    		$slider = true;
    	echo $block->render();

    So the blocks (using pageable field) with templates 77 and 79, for example, set the variable and it can be used in he appended _main.php file. But it seemed more logical to define it in the block itself.


  3. But I wanted quite the opposite, I mean:

    1) The rendered page is a block containing a slider (block-slider), so I declare a variable here, like $slider = true.

    2) The render page ("basic-page" for example) renders that page/block

    3) I'm using markup regions and in the _main.php file: $slider = true, so it outputs the necessary scripts and styles for the slider to work

    Thought it was a good way to optimize page load speed, to only use the scripts/stylesheets needed for each type of rendered block. But I misunderstood how point 2) is actually working.

  4. 1 hour ago, adrian said:

    Not sure if that's the best approach ?

    With page reference fields I think you want to go with a custom selector and add "check_access=0" to the selector.

    Your way seems better to me ? thanks.

    Curiously using "page list" as input field type shows all pages tree, using a "select" shows only users.

  5. Hello,

    I've created an "editor" role and there is a template (blog post page) with a page reference field where it should be able to choose an user (post author) but it seems it doesn't have access:

       "You don't have access to list page /alambre/access/users/"

    What permission should I add to the editor role? Already added view/edit in user template.

    Thanks in advance.

  6. Hello there,

    I'm using a pagetable field with several templates and render(), it's possible to pass a variable? for example:

    - file "block" where:   $slider = true

    - basic-page:   $block->render()

    - _main: if ($slider == true) { slider scripts and css } (but $slider doesn't exists and throws an error, as I understand render() just outputs the html markup)

    Is there a way to do this?

    Thanks, Alejandro.



  7. 9 hours ago, adrian said:

    Are you by chance using the master instead of develop branch again?


    Yes, I upgraded to the latest version. Anyway, I've changed it to repeater field with image + page reference fields, so problem solved.

  8. Hello, after creating an array and assigning it to a variable in session:

    	$order = array ();
    	$order['token'] 		= 'token';
    	$order['product']		= 'product-name';
    	$session->order 		= $order;

    I try to insert another item:

    $session->order['price'] = 'price';

    But it doesn't work: 

    Notice: Indirect modification of overloaded property ProcessWire\Session::$order has no effect in...

    Isn't possible to modify such session variable? I could build another array from the session variable, add the new item, and then store it again in session, but doesn't looks good.


  9. On 11/12/2015 at 1:00 PM, adrian said:

    Sorry for the delay in getting back to you regarding the error - I still need to look at this again, but for now I have a new problem for you :)

    It looks like the Page Link option isn't working properly - it just shows a text input with "0" as the value.

    Screen Shot 2015-11-12 at 9.59.43 PM.png

    If I load "InputfieldPageListSelect.min.js" in the module, then it works as expected.

    Screen Shot 2015-11-12 at 9.59.56 PM.png

    Hello, would you mind to point how to do this, I get this very same error.


  10. Hello, I can´t upload an animated gif into an image field, when using "Choose file" or dropping the file onto the field it keeps spinning but doesn´t finish, and when saving the page it's not uploaded. Any idea why?

    Thanks in advance, Alejandro.

  • Create New...