Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/23/2020 in all areas

  1. @Jens Martsch - dotnetic, @rjgamer, @teppo, @szabesz, @erikvanberkum, @dragan, @Lutz, @eydun, @psy, @horst, @cstevensjr, @tpr Just tagging in those who have reacted/responded to this topic in order to bring your attention to the notice above. Please don't uninstall but update to v0.2.1 or greater ASAP. Again, my apologies for the error. The intention was to have the module clean up after itself on uninstall but it's just too risky.
    7 points
  2. And simply using $this->pages->findOne() inside Events can't do the job ? As PagesType extends Wire, it should be available as $events->pages->findOne()
    3 points
  3. I understand why you are asking for this feature. You're not the first one. But it's not as obvious as it seems. The 'title' field is not the same as all other built-in fields. You can't modify the behavior of the built-in fields per template basis. Which means they all behave the same no matter what template the page has. That's why we have a generic type 'Page' that has all the built-in fields. No matter what template the page we can confidently serve those fields for every page. The 'title' field's behavior could change depending on the template. I understand that it is almost never the case, but semantically it is. For example, you can set different access settings for 'title' field depending on the template. You make it that user can view the 'title' on one template and not on the other. You can change the description of the field for each template and it will appear in the GraphQL documentation. You can also make 'title' field 'not required' for one template and 'required' for others. So, including 'title' field into the Page type will break the semantics. I understand that 'title' field is almost always treated as a built-in field but I just can't overcome this feeling that it is the 'wrong' way to do it. I would like do it only the 'right' way. And the right way brings us to your second question. If we implement it properly and add the ability to get the values of the template fields for generic Page types, then 'title' field should also be solved. For this we will be adding interfaces. It will allow you to get template fields for Page types by providing a template. It will look something like this. { city{ list{ children{ # <== let's say children are the pages with template skyscraper and architect list{ id name ... on SkyscraperPage { # <== you basically say: "for skyscraper pages give me these fields" title images{ url width height } } ... on ArchitectPage { # <== "and for architect pages give me these fields" born email resume{ url filesize } } } } } } } this way you can fetch values for all template fields on Page types. This will work with everything that returns a Page type. Including 'child', 'children', 'parent', 'parents' and Page Reference fields too. And the best part is, it will be semantically correct! ?
    3 points
  4. IMPORTANT NOTICE TO ALL USERS OF THIS MODULE! I just discovered that the uninstall routine in v0.2.0 can inadvertently delete directories that it shouldn't depending on the module configuration. If you have v0.2.0 installed please DO NOT UNINSTALL but instead update the module to the recently released v0.2.1 as soon as possible. The module can be safely uninstalled from v0.2.1 or higher. To update the module, visit the module config page, expand the Module Information section and click "check for updates". I apologise for this error.
    3 points
  5. preg_replace('~(<h[23]\\b.*?>(?:<[a-z][^>]*>)*)(\w+)~ism', '$1<span>$2</span>', $headline); quick&dirty in PHP
    2 points
  6. This is the answer I got in their Slack developer channel:
    2 points
  7. Not sure if this will suit your needs, but in javascript (jquery) you could do: $('h2').each(function() { var $element = $(this); $element.html($element.html().replace(/^(\w+)/, '<span>$1</span>')); });
    1 point
  8. The theme itself should be the last piece you think of editing, as you will invariably detach yourself from future improvements that come with the regular updates. Almost everything can be done by using existing modules or, for very specific requirements, by extending other modules or writing your own that work within the theme (and still do when you switch to another theme). Have a look at @Soma's Page List Image Label module as @dragan suggested. The commercial Lister Pro module might also be worth a look. With it, you can create flexible page lists and add them to the menu for your editors. There are nice screenshots here, for example. It should be possible to add these listers to the main menu level too. You can even build your own Process modules to extend the backend, which is quite straight forward. You can find a good introduction in the PW blog. You can add custom fields to your User template, and the configuration (Setup -> Configuration) of ProcessUser lets you select which of those are visible in the user list. Changing the buttons in the page tree can be done through hooks on methods in ProcessPageList and ProcessPageListActions (e.g. inside site/ready.php, which is update-safe) and, on the visual side, by adding your own custom js and css (e.g. through the Admin Custom Files module).
    1 point
  9. @J_Szwarga Have you tried to set base URL? https://processwire.com/api/ref/markup-pager-nav/set-base-url/
    1 point
  10. Hi Adrian, I would be happy to hear that you give another chance of the possibility to move the bar to the bottom left corner, optionally. Dragging it around is kinda pointless, at least in my point of view, but as I already explained it in the past, the bottom right corner can sometimes be problematic when Tracy interferes with something, and covering an interactive part of the site is not really a solution. However, it is very rare that both bottom corners contain interactive elements, so being able to pick which corner to cover would suffice most situations, I think.
    1 point
  11. Hi @Ivan Gretsky - the core Tracy package comes with the ability to drag the bar but I disabled it long ago because it was causing too many problems and I didn't really see many advantages. Perhaps you can solve the issue you are having with the "Starting z-index for panels" option in the module settings. If that doesn't work for you, let me know and we'll figure something else out.
    1 point
  12. This does the job perfectly, indeed. Thanks a lot for that simple yet elegant solution. So all you need to add to site/api/events.php is public function findOne($selector, $options = array()) { return $this->pages->findOne($selector, $options); }
    1 point
  13. Good day @adrian! I want to move Tracy bar from right bottom corner to the left. So the online chat box would not be in front of it. I saw the bar being moved here and there, but I can't reproduce it in my installation. How do I do it?
    1 point
  14. I can't answer all of your questions right now, but you should never edit any file in the wire-folder. It will be overwritten the next time you upgrade PW. With admin themes, you can simply copy the entire admin-theme folder from wire/modules/AdminTheme/AdminThemeDefault to site/modules/AdminTheme/AdminThemeDefault. PW will notice there are two versions of the same module and ask you which one it should use. Just select the site/... version and then you can work with the copy. (I think that applies to any kind of module - not just admin themes) re: your first use-case / question There's an old module out there which does something similar: Pick an image from the page and display it in the page-tree. iirc it's a module (or hook?) by @Soma; search the forums - you'll find it eventually.
    1 point
  15. UPDATE 2020-01-19 This is a follow-up to my last post! The question was asked when v3 of the cart system will be implemented in SnipWire. The following features are still missing in Snipcart v3: Digital goods Google Analytics integration Inventory management Deferred payments Multi-currency Recurring subscriptions with Stripe Authorize.net support Some of the listed features are required by SnipWire as they are essential and would require a lot of code rewrites to exclude them. So SnipWire will be changed to use v3 of the cart system when the following features are available in Snipcart: Inventory management Deferred payments Multi-currency
    1 point
  16. Are you hitting maxAllowedContentLength? I think it's 30000000 bytes by default ...
    1 point
  17. If the pages are not viewable they won't appear in the menu/won't be returned as menu items. Make sure the templates they use have a template file and there aren't any other restrictions.
    1 point
  18. Thanks to all. I built something similar as Klenkes' solution by adding the Markup CKEditor module to pw.
    1 point
×
×
  • Create New...