Jump to content

joe_g

Members
  • Posts

    248
  • Joined

  • Last visited

Recent Profile Visitors

4,761 profile views

joe_g's Achievements

Sr. Member

Sr. Member (5/6)

26

Reputation

5

Community Answers

  1. Ha! Thank you. After working with PW for a decade i still didn't know fields had access rights!
  2. Hi there, I've got a site with pages built with the repeater matrix. In the repeater I've got an images field where the editor uploads images and can then place them in the body text. The placed images only appear if you're logged in as admin. I suppose that has to do with the repeater matrix pages aren't fully visible for guest users, or something in that line. But I don't know what to do about it exactly. One solution is to have an 'images' field on the page itself, and not inside the repeater matrix, but its a hassle because once you are editing a text field inside the repeater matrix and select the image icon to place an image you're not in the parent page, you have to go and find it, like so: What's the solution to allow placeable images inside a repeater matrix? Thanks! j
  3. omg. ...... took me a good hour to realize I had forgotten to actually install the lazy cron module *hand clap*
  4. Hi there, I can't get my LazyCron to fire <?php $useMain = false; $wire->addHook('LazyCron::everyMinute', null, function() { $log->message("1 min passed"); echo '1 min passed'; }); echo 'hooked - '; ?> Some output for good measure I tried making it into an anonymous function (see above), but same result as by using the example in the docs (with regular function). No lazycron*.cache file, No logs, No message - it just doesn't fire at all. Not sure how to proceed? tx!
  5. Hi there, I've got a site where the editors are creating tags using a 'Page Auto Complete' Field. Through this field they can create new tags with "Allow new pages to be created from field". The problem is that any page (tag) created this way ends up only be published in the default language. The site is bilingual, and when trying to access this newly created page (tag) in the non default language it gives a 404. Any tips how to get the page (tag) be published in all languages is greatly appreciated 🙂 thanks, J
  6. Hi there, I've got a peculiar problem in the backend I don't manage to solve on my own. After moving a page, the spinner won't stop spinning: Under Network, in the console I can see continuous requests: Not sure how to fix this one. I run over 10 other PW install on the same server, they all work fine. But this one is the only one with the latest version ProcessWire 3.0.200. So I assume it has to do with something recently changed. thanks!
  7. @Jan Romero Wow, interesting. Thanks, will try this!
  8. I have ~800 things (in this case published texts) that needs to be shown in random order. It's about 20-50 pages or results, depending how many I show per page. Preferably the randomization stays the same, so a refresh (or a page change) doesn't ruin the order.
  9. Hi there, I'm trying to achieve randomizing a large set of pages that needs pagination. It could happen every night or so. I know sort=random doesn't work with pagination so I thought, if I can randomize the position of the pages in the actual backend this could work. This might be a heavy operation, but I also wouldn't know how to do it so it's effective. There is the https://github.com/kixe/PageMove PageMove. plugin that could to this with the method sortChildren(). This plugin doesn't seem to be present in the store. But, in the forums there is mentions of this function being built in to v 3.0, but I can't find the docs for that. Would you know the best way to go about this? thanks! J
  10. @Robin S I can confirm that this works really well. it's a relief, honestly - I expected having to dive deep int sql for this. One thing that doesn't seem to work is to match things in quotations "Alice One" and "Alice Two" will both be considered related because of the same first name "Alice", regardless of quotes or not. But that's fine in my case.
  11. Thanks!, I edited my post above while you responded. In the mean time I've realized that my misunderstanding is that I can't replace parent regions, then the child regions will be destroyed. Like, I can't have this and update both foo and bar directly using replacement <div id="region1"> foo <div id="region2"> bar </div> </div> i would have to do <div id="region1"> <div id="region1inner"> foo </div> <div id="region2"> bar </div> </div> However, as you suggest, I can add to the parent like (using the code from my previous post) <div id="maincontent" pw-append> added this to main </div> <div id="testregion"> replaced </div> ..as long as i don't replace the whole parent. This makes sense, since I suppose this is some form of string replace behind the scenes awesome, and thanks again Ryan! J
  12. Thanks for getting back about this! Here is a test (using tailwind css). _main.php (global) <body> <div id="maincontent"> </div> </body> _testregion.php (appended to template 'test' under files tab) <div id="testregion" class="border border-red-600"> default value from _testregion.php </div> test.php (actual PW template) - note the nested divs, how testregion is inside maincontent. <div id='maincontent'> <div class="p-8"> <div id="testregion"> should be inside red border? </div> </div> </div> What I'm trying to do is to apply my own "markup pattern" called testregion to an arbitrary position, but it doesn't do what I expect. Instead of getting "Should be inside red border" inside the red boder, i get _testregion.php appended after the output of _main.php. The result looks like this: However, it does work if I specify the innermost region in test.php, like <div id="testregion"> should be inside red border? </div> That means i can't match arbitrary regions that are inside each other, it would always have to be the innermost region(s)? This means that the site structure (the markup hierarchy) has to be entirely defined inside _main and I can never specify some markup that is simultaneously a parent and child. Maybe this is a good thing, I'm not sure. But this is what got me before.
  13. Hi there, I just discovered markup regions while looking for some templating solution. I've got a couple of layouts that are shared across a bunch of regular PW templates, and I'm looking for a way to abstract this, so that i don't need to have the same code duplicated across multiple places. I would like to keep the HTML "direct", so rather <div class="<?=$somePhp?>"> than, say echo "<div class=\'{$somePhp\}"> I think that rules out all regular delayed output strategies. Markup regions seemed perfect on the first look, but there are some limitations, if I understand it right 1. There is only one global markup region file (ie. _main). I can't use an arbitrary template file for some specific situation (like _myArticleLayout, for example) 2. I cant inherit templates, or chain, or stack them, or similar. I can't apply first _main, and then another one _article, for example 3. Related to this, I can only do appendTemplateFile globally in config.php, but I was hoping I can do this in the top of each template, or maybe even for parts of templates Now, some questions. Is there a better way to do this? Another templating engine? Is there a way I can use the magnificent markup region replacement engine myself, separately? Or did I simply misunderstood how this works? As a sidenote it seems I can't get nested regions to work, perhaps because I'm not using this the intended way? many thanks
  14. Hello, I'm lost with my Matrix (profield) and how to look for data using selectors: I have a matrix ("grid"), it has a 'matrix repeater type' mp4 that contains the fields 'mp4' and 'ratio' (and others): Under admin / repaters in the backend, things look a bit cryptic: Now, how do I find the mp4s that doesn't have a ratio? I would imagine something like wire('pages')->find("template=repeater_grid,mp4!='',ratio=''"); ..but I can't get any meaningful results back. If I could only get all mp4's, that would already be a good start... many thanks J
×
×
  • Create New...