Jump to content

bernhard

Members
  • Posts

    6,629
  • Joined

  • Last visited

  • Days Won

    358

Everything posted by bernhard

  1. as far as i understood currently the workflow would be like this: create a template "metatags" add fields, "author", "description" and so on create a page holding all those meta-tags pages, eg "/metatags" add a page field "metatagpagefield" to all those templates where you want to save metatags, eg "templatea" and "templateb" create a page "demo template a" with template "templatea" now you have your field "metatagpagefield" and you can add a page there. if you setup everything correctly (auto-name and predefined parent) you could add your metatags via a modal window. your metatags would get stored somewhere like /metatags/automatically_created_pagename now you could just edit the template "metatags" and all your templates with the field "metatagpagefield" would have those changes instantly. at the moment this workflow looks kind of complicated, but i think what lostkobrakai is saying, is that if the presentation (the GUI) of the pagefield would be different (automatically creating the page /metatags/automatically_created_pagename in the example above) and showing the fields of this page directly in the edit-screen of page "demo template a" the editor would not even notice whats going on behind the scenes. thats similar to repeaters and would be a great option imho! it was not at all a noob question. welcome to the forum btw @lostkobrakai - didn't want to beat you, just wanted to explain it in my words to see if i understood it correctly
  2. ok i needed 5 reads of this and your old post and now i get what you are saying that would be an awesome solution and would REALLY help in situations mentioned in this topic! +1
  3. does it also support ajax fields? ps: @Pete can you PLEASE set the limit for "short time frame for new posts" to zero for experienced forum members?
  4. it's now built into AdminOnSteroids:
  5. thank you. i thought it was already there, don't know how i missed that
  6. quick question because i needed it today and couldn't find it: is it possible to see the current url segments somewhere? i just found "urlsegments ON/OFF" indication but it would also be helpful so see wich urlsegments are currently active. thanks
  7. what is your question? does it work or does it not work? don't forget to sanitize your input variables! $ID = $_GET['id']; // better $ID = $sanitizer->int($input->get->id); maybe also check if the page exists: if(!$pages->get($ID)->id) // return or throw error see https://processwire.com/api/variables/sanitizer/
  8. I'm using simple honeypots with very good success and find your idea nice. would be interesting what the others say about that!
  9. hi Tom, i was also using wireRenderFile a lot and tried render() and renderValue() a lot in my current project and its great! example for my blogitem: <article class="tm-article uk-margin-large-bottom"> <?= $config->alfred->render($page) ?> <?= $page->render('pic') ?> <?= $page->render('date') ?> <?= $page->edit('body') ?> <?= $page->render('files') ?> <?= $page->render('gallery') ?> <hr> <div class="uk-grid blognav"> <div class="uk-width-1-1 uk-width-large-1-2 uk-text-left uk-text-center-medium"> <?php if($page->prev->id) echo '<a href="' . $page->prev->url . '"><i class="uk-icon-arrow-left"></i> ' . $page->prev->title . '</a>'; ?> </div> <div class="uk-width-1-1 uk-width-large-1-2 uk-text-right uk-text-center-medium"> <?php if($page->next->id) echo '<a href="' . $page->next->url . '">' . $page->next->title . ' <i class="uk-icon-arrow-right"></i></a>'; ?> </div> </div> </article> this will render for example the file /site/templates/fields/gallery.php <?php if(!count($value)) return; ?> <p class="uk-text-bold">Galerie</p> <?php foreach($value as $item): ?> <figure class="uk-overlay uk-overlay-hover tm-padding-gallery"> <img class="uk-overlay-spin" src="<?= $item->size(120, 120)->url ?>" alt="<?= $item->description ?>"> <div class="uk-overlay-panel uk-overlay-icon tm-overlay-icon-zoom uk-overlay-background uk-overlay-fade"></div> <a class="uk-position-cover" href="<?= $item->maxSize(800, 800)->url ?>" data-uk-lightbox="{group:'gallery<?= $page->id ?>'}" data-uk-lightbox title="<?= $item->description ?>"></a> </figure> <?php endforeach; ?> Example for renderValue: <div id="tm-page-heading" class="uk-container uk-container-center"> <div class="uk-flex uk-flex-middle uk-flex-center"> <h1><?= $page->renderValue($page, 'title') ?></h1> </div> </div> this will render the file /site/templates/fields/title.php (because of the "title" inside the <h1>[...]</h1>): <?php if($page->template == "person") echo $page->personFullName; else echo $page->get('headline|title'); in this file you will have the $page variable available, because that was the first parameter of your rendervalue call. other examples could be: $page->renderValue($yourarray, 'your-array-view1'); $page->renderValue($yourarray, 'your-array-view2'); $page->renderValue($booking, 'your-booking-view'); ps: found this one but didn't check if that answers your questions:
  10. if you are worried of the urls because you are migrating the site and want to avoid 404s from old links, you can also use this awesome module:
  11. thank you for the hint - i read it but forgot it lateron... it's on my list now, so i will try it with my next project!
  12. Feature request: An auto-update feature for TracyDebugger! Just kidding
  13. hi tpr, would be great to have this in your module! but i have to say i really like it that one can see the field NAME of a field thanks to soma's module. that's something i often need when developing sites. maybe show them only on hover? https://github.com/somatonic/HelperFieldLinks/issues/7
  14. also a little feature request: what do you think of adding a "create copy" button so one could easily add new jumplinks based on existing ones?
  15. hi Xonox, have you read this topic?
  16. hi kixe, some more questions i want to have daily backups of my database, maximum 10 files. when is the backup trigger triggered? is it triggered by EVERY pageload (also guest users) or only by logged in users? i want the backup be crated also on guest visits. do i have to grant the guest role "db-backup" permission? next question for understanding: what happens when this role does not have this permission? is it correct, that the cronjob itself will be triggered once a day, but if it is triggered by "guest" it will NOT create a backup and if it is triggered by "superuser" it WILL create one? i think some more explaining words in the field descriptions would be a great help! thank you for sharing your module!
  17. i'm curious... does a wire('pages')->uncacheAll(); at the end of each iteration help?
  18. i got a very misterious behaviour today. after some time of debugging i made it down to the following: i have this script in my _init.php function myHook() { wire('log')->save('lazy',"backup!"); } // add a hook to your function: $pages->addHook('LazyCron::every30Seconds', null, 'myHook'); wire('log')->save('lazy', 'hook added'); install lazycron refresh the site hook added and backup in the logs BUT install cronjobdatabasebackup refresh the site only "hook added" in the logs! no matter what i do the cron seems not to be executed. deleting the file /site/assets/cache/LazyCron.cache solved that problem. can you confirm that @kixe ? or did i do anything wrong? first time for me with both lazycron and your backup module
  19. sorry, just throwing in wild guesses... maybe something like that? or findMany if you are using pw3
  20. i had 502 errors yesterday with sparkpost mailings and active tracy debugger. are you using tracy? try switching it off. of course that's not a solution just a quick suggestion for debugging...
  21. $pages->trash($pages->find('cms!=processwire')); ps: no, i don't want to blame other great software products. but we are in the pub and i just want to make fun (and of course praise our great API)
  22. thank you all. for the time i ended up using dropbox and just share the download-links:
  23. hi mike, just wanted to say a big thank you! installed it today on a relaunched site and it works great! awesome module, awesome docs!
  24. hi @ottogal that would be quite easy achievable via javascript. see this post of how i implemented this on a pagefield:
×
×
  • Create New...