Jump to content

arjen

Members
  • Posts

    1,222
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by arjen

  1. +1 3. It would be great if we could enter the new template name directly before duplicating. So the template and field duplication process are equal.
  2. First thoughts: Have you exported the tables or the database itself? Are you importing the tables or the database itself? Is the database you are importing too really empty?
  3. Hi slave, Please look at the hooking example provided by soma on Github. You need to change it like this (written in browser, not tested): function hookGetListClass(HookEvent $event){ $child = $event->arguments('page'); // current rendered child page $class = $event->arguments('class'); // the class string already present // any check on that child to set your custom class if(count($child->parents) >= 2 && $child->numChildren){ // Only proceed if at least two parents and if an item has children $event->return .= " dropdown-submenu"; // add your custom class to the existing } }
  4. Have you tried: 'has_children_class' => 'dropdown dropdown-submenu',
  5. Thanks for pointing it out gRegor! I could say it was late, but it wasn't. On topic: Content-Type: text/html for me as well.
  6. Hi gRegor, Since 2.5.26 you can define what content-type to serve.
  7. You can easily build "blocks" yourself. Take a look at the RepeaterMatrix, PageTable or PageTableExtended. Also check the new field rendering options.
  8. Hi Danjuan, welcome! Take a look at the application luis build a while ago. It's released not long ago, but it isn't maintained. But it'll give you some insight in how he approached a similar situation.
  9. Apologies. I didn't explain myself well enough. Since it is the same database you can easily access all the data. What I was trying to say is: without a SSO it isn't possible for a user to be logged in at the same time on multiple domains in the same session. For example: if a user is logged in www.domain1.com and he visits www.domain2.com the user is not automatically logged in on the second domain. The cookie storing the session data can't be shared across multiple domains. This actually is a good thing so a domain can't access cookies form other domains.
  10. arjen

    Admin lag

    You might want to try to set the the dbHost in /site/config.php to: $config->dbHost = '127.0.0.1'; // Use an IP address instead of localhost Also on Mac don't use .local domains like mywebsite.local. This can be very slow due to some internal routing stuff. There are others too with slow admins. Small hint
  11. Hey Peter, I got a few up and running. Not really difficult, just make sure the domains are pointing to the same server and directory. Your questions: 1. See below for screens. 2. Unfortunately you can't share users across multiple domains by default. You need an Single Sign On service to share (front-end) users. 3. Depending on how you create your set-up you can easily deploy another site. In the set-up below the logo and content are different. We are going to add 4-5 sites when the first two are ready. Note: I'm using multi-site by apeisa (and later soma). I saw that soma recently updated some stuff to handle 404. I use a module for the different 404 pages. Also be sure to create two form-builder pages since the first one can't be shared. This might be different in soma's newest version. Screenshots: Tree Module configuration Name setup of the new homepage
  12. Thanks Tom! Looking forward
  13. The ability to add tabs not specific to ProDrafts. Create a new field called "sidebar" with the type FieldsetTabOpen. ProcessWire will automatically add another field "sidebar_end". Go to a template and add those fields. Add some fields between sidebar and sidebar_open and you will have a tab for that specific template. You can also group fields with FieldsetOpen.
  14. Hey renobird, the content in both pastebin links seem to have been removed. Any change you can upload them (again)? Maybe a gist?
  15. After doing some testing it turns out that when a user doesn't have access to edit a field the classed were not added since there is no Inputfield to render. Better solution: wire()->addHookBefore('InputfieldWrapper::render', function($event) { $wrapper = $event->object; foreach ($wrapper->getChildren() as $f) { // Only fieldtypes can have tags && make sure the fieldtype has tags if ($f->hasFieldtype && !empty(wire('fields')->get($f->name)->tags)) { $f->set('wrapClass', "tag-" . wire('fields')->get($f->name)->tags); } } });
  16. Hey Horst, Thanks for your post. We figured it out. My assumption that the Inputfield stores the tags wasn't correct. You have to get the field itself and you can access the tags from there. You can find the code that actually works: wire()->addHookBefore('Inputfield::render', function($event) { $inputfield = $event->object; if ($inputfield->hasFieldtype && !empty(wire('fields')->get($inputfield->name)->tags) { $inputfield->set('wrapClass', "tag-" . wire('fields')->get($inputfield->name)->tags); } });
  17. Hi Horst, I loosely based my coding on this topic. I assumed that if InputfieldPage render method was hookable the InputfieldPage render method would be too. Still tangling my head around this OO stuff, not really sure what this abstract method means. Martijn will probably explain it to me again
  18. Hey Martijn, Yup, pretty sure. It only seems to work on Page fields. I can change pretty much anything but only within the Page fields. I must be missing something. I also tried addHookAfter and made sure the event is returned, but no success. If I try for example: <?php wire()->addHookBefore('InputfieldText::render', function($event) { // Notice the change from Inputfield to InputfieldText. $inputfield = $event->object; $inputfield->label = 'tralala'; }); The labels of all the Text fields will be replaced with tralala. But I would like a more general solution, otherwise I would have to specify all fields.
  19. Hi, I would like to add an wrapClass property to an Inputfield in the admin. The class should be based on the tag used in the Inputfield settings. I have given all my fields a tag. When I load a page in the admin only the Page fields are loading the wrapClass. I'm using the following code (PW version 3.0.7): <?php wire()->addHookBefore('Inputfield::render', function($event) { $inputfield = $event->object; if (!$inputfield->tags) return; $inputfield->addClass("tag-{$inputfield->tags}", 'wrapClass'); }); in my /site/init.php. I also tried /site/templates/admin.php but with no difference. Any thoughts?
  20. I can confirm it doesn't work out of the box. Batcher is using Fancybox which doesn't seem to be included in ProcessWire 3.0.x. You can either file an issue or strip out the Fancybox stuff (1, 2). Or both
  21. Hi Tom., Could you specify what kind of security issue there is?
  22. Thanks for responding. We are going to test it thoroughly. That's why I'm looking for all options. Pity you haven't used it yet. IftRunner with (Page) Actions are really simple as a concept, but quite powerful. Antti wrote about their use case a while ago.
  23. Hey Horst, Looks really impressive, but I'm wondering how this module differs from the queuing done in IftRunner combined with Page Actions. I'm comparing both at the moment for a rather large project we are working on. One thing I see it that you have different queues whereas IftRunner only has one queue to store them all. Any other differences that you are aware of?
  24. Hi Marc, if it isn't reproducible it can be hard to track down. I haven't tried it with the latest 2.7.2 master version. What version of PW do you use?
×
×
  • Create New...