Jump to content

Ivan Gretsky

Members
  • Posts

    1,450
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Ivan Gretsky

  1. I do not see a need for function here at all <?php // LIST PARTICIPANTS CHILDREN OF THIS PAGE $overviewchildren = ''; foreach($page->children as $participant){ $partnerID = $participant->partnerID; $overviewchildren .= '<div class="row">' . '<div class="col-sm-2">' . '</div>' . '<div class="col-sm-10">' . '<strong><a href="' . $participant->url . '">' . $participant->p_first_name . ' '; if($participant->p_middle_name) { $overviewchildren .= $participant->p_middle_name . ' '; } $overviewchildren .= $participant->p_last_name . '</a></strong><br />' . $participant->p_job_title . '<br />' . $participant->p_department . '<br />' . $pages->get("parent=1004, partnerID=$partnerID")->title . '<br />' '</div>' . '</div>'; } ?> But actually $participant->partnerID should be a Page Field so you can just write $participant->partnerID->title P.S. Note the use of get instead of find.
  2. This can be done with a redirect from child template. The redirect should also pass a parameter with child page id that should be caught in parent template and shared with js with something like this <php echo "<script>var modalPageId=" . $input->get->childPageId . "</script>"; Then you should check this variable in your javascript and fire a popup if it is populated. BUT! Do not do none of this cus it is bad for everything: SEO, usability, you name it. Just through a 404 on child pages. If you need direct link just include a get parameter.
  3. This is because of a variable scope. Use wire('pages')->find(...)... instead. See Ryan's explanation here.
  4. Yes, that is the route I will probably take. I think about storing the token in the user template and use it only in pair with login. I am planning to use forceLogin to authenticate without password on condition if the token in the url matches the token stored in the user template.
  5. I would go with method 2 - let each person be a page on his own. That will make it easy for you to add properties (fields) for them in the future. For example, their performance stats or sоmething. You can use Page Table field (or RepeaterMatrix if you got ProFields) to manage all the team members on the same page, but it is optional. Each person this way can have an image field (gallery) on his own. You can get the first image from a person page on the team page to make a list of team members. I think it could beneficial for you to see the code of skyscrapers profile (live demo here). It is by Ryan and can open your eyes on quite a lot of ProcessWire possibilities.
  6. As Schedule Pages module is based on Lazy Cron, I would probably either make a custom module that hooks Lazy Cron, or modify Schedule Pages if you need admin interface for it. Another idea is to write a trigger for IftRunner based on Lazy Cron and an appropriate action . I don't know if that can be done easily, bit that would be a "leaner" interface for site managers.
  7. Just been there, thanks. I am hoping to find something on-site (or at least with an integration as a module) . P.S. And I think this link has all the rights to be here, Sergio.
  8. Good day! I am looking for a solution to do a login-with-a link functionality. A site should generate and send via email a link to a user. That link should contain (as I can imagine) a login and some kind of token. Following that link a user is able to get automatically authenticated on a site and view the page, otherwise inaccessible.
  9. No need for repeaters here. Pages are the most common solution for most things and are a right choice for this case too. Make a dog template, create all the fields you need, assign fields to dog template. Place all dog pages under same root (something like dogs). You can configure all dog pages to be automatically placed under the dogs page on creation. If you got the budget get ListerPro for admin - it will make finding the right page in the admin a breeze. If you don't, you can create a custom Process module for that. For the frontend filtering take a look at skyscrapers profile (live demo here).
  10. Is it called Aligator because it eats hell lot of memory or something? Jokes aside, why Aligator? Why with the single "L"? And you know my obsession... Can it render MenuBuilder contents somehow?
  11. Jeffrey is the man! He is doing something free for laracasts now, but his paid PHP Fundamentials are already a classic! If you can not buy the subscription - steal it from some pirate torrent or something ! P.S. Just kidding. You should not steal or attemp to get something for free which is not. It's wrong. Support the thing that you like instead! And go to pirate torrents only if you absolutely need something and have no chance to get some money to pay for it. And it is still no excuse though. P.P.S. Hope this little ad is some kind of excuse...
  12. Goog day! I have a Page field inside a Repeater inside a Repeater (yeah, x2). I need to determine the selectable pages for that Page field via php code. But I do not have access to $page variable from there. I can access $pages though. Is there a way to get the $page edited value? I have asked a similar question about Page field inside a Repeater inside a RepeaterMatrix, but it is in a vip forum so has a) less chance to be answered quickly and b) less chance to help someone else. Just mention it not to be banned by the moderators . I checked and the same problem repeats in either case. Promise to post a solution to the other topic if we'll produce one.
  13. I do not know why do you need it? Why not have 404 on something you don't want to show anyway? Why not have a php file to do what you need if you need it? You can build a separate page tree branch just for categories (for business-categories template pages) and connect them to end-level pages like ABC Fence with page field. In this case your end-level pages should have different template and can live under business-directory, while categories themselves are elsewhere as noted above.
  14. What are you suggestions about it? Only use selectors based on path?
  15. You just might want to consider putting this kind of stuff in your build chain with the autoprefixer postcss plugin (which is in the heart of mentioned editor plugins) so you don't need to manually run it in your editor every time.
  16. I am not sure it is even possible at all, at least looks like it is not so easy to do. But this seems to me the case you can and should manage by organizational means like docs and some education for the managers. Maybe add some kind of field for notes, so you can give page specific instructions.
  17. When something changes you always get stressed (or delighted, if you're lucky). But changes are the nature of the webdev game we play. So better be prepared. Anyway, someone being here the 1st day probably won't notice anything . The fact that you're used to the old forum just proves how addicted to PW you are! But we can probably tune a few things. Here is my list of butt-hurting new stuff: The question-answer functionality. I think it can be turned off, but for now it still persists in some forum threads. I do not know why. New restrictions. I tried to reply in the News & Announcement forums and could not. My favorite way of using the forums has always been going through the new content list. Now I have to make a few more clicks to get to that page. If this is common, maybe but a link in the top menu? The look of that page with the timeline looks unusual to me and filtering is not as fast, but I can learn to live with that. There is too much dark colors (on the pager, for example). If there is a chance to bring that old light theme to the new forums, it would be great. The pager on the top is below the initial post. I think it previously was above it. I could not insert any smiles. I found the menu icon on the top, but nothing happens when I click on emoticons. Or is it just me? Well i did it with drag-and-drop, but still a bug. Thanks Pete!
  18. Welcome to the forums, Stephan! I do not think there is a way easier than installing kongondo's module you mentioned. Other way is to write your own form markup and use appropriate javascript. There is no straightforward way to use the admin inputfield on the frontend that I know of.
  19. I think that this is intended behaviour. The documentation says "contains the exact word or phrase", but does not say they have to be separated from their surroundings by spaces or some other characters. In fact that is the commonly desired behaviour as you would like to find "orange" in "orаnges" most of the time. So i think your ^=S10 selector will still find S101.
  20. Maybe you need to configure what the file field object returns when there is no data attached? It is done on the details tab. Any configuration should not cause the behaviour you're describing, but still...
  21. Nobody, I guess, as soon as version 2.8 becomes stable.
  22. That was kind of funny, so I decided to share... Recently I faced the same problem once again and went to the forum search for the answer. How was I surprised to find this topic by myself with a solution by myself present! Of course I did not remember that I already asked that . So I decided to come here no more. Went to github, wrote an issue and got the fix from Ryan the same day in the latest release. The moral is if you find a problem and found the solution make sure it is fixed forever in the master code, so you don't have to deal with it ever again. And the way to do it with PW is using github (issues or even better PRs). All that sound obvious, but may be not so for someone like me thinking that devs read the forums all day long looking for some stuff to fix.
  23. Привет M.O.Z.G! Welcome to the forums! The dependency data for a field in a fieldset is stored in fields or fieldgroups_fields (if overriden) table in data field in json. So it has to be accessible via standard WireData methods. The name of the property is showIf. Have no chance to try it, but you can get it like $field->get('showIf'); ... and you still have to process that string yourself this way. I did not find a way to get the visibility of a field dependent on other field via API though. Should be here somewhere if it exists. Try this, but I doubt it will help. Sorry for no real help) Hope someone more experienced can help out here. If you would explain your case a little further we could find a workaround. I almost never render through $page->$fields.
  24. Not sire what you mean by "to compose an newsletter in the backend as a page". Write the email in textarea field? Or send a rendered output of a page via email. Anyway, both ways are possible using WireMail. And check out this awesome module by Martijn that just might be useful in this case.
  25. Welcome, Mélanie! It seems like almost everybody here tend to move to the latest dev release as soon as it is possible. Maybe it is because so much new tasty features are in almost every dev release, or maybe because almost every dev release is as stable as master. I would definitely encourage you not to be afraid of the dev status in most of the cases. Maybe not for a billion-visit-per-day sites, but in most cases) P.S. But backups are still a must, you know.
×
×
  • Create New...