Jump to content

Yannick Albert

Members
  • Posts

    58
  • Joined

  • Last visited

Everything posted by Yannick Albert

  1. Just for fun: https://gist.github.com/yckart/7067361
  2. Awesome, good stuff! Seems to be the perfect starting point to work with repeaters to me... I'll take a look deeper in it, later this day. But nevertheless, thanks for the great adaption! Cheers, Yannick
  3. Yeah, you are on the right track. I just asked me how to to create a new repeater, including some fields, via pure API. (And without adding them first to any existing page, except the module-configuration page. Don't if it is already possible?!) Thanks so far
  4. How could we add a repeater-field to our module configuration pages? I tried to add it like any other input field, but no success! (Just as a sidenote: Unfortunately my php skills are really restricted) This is my current state, but it just throws an exception: Error: Exception: Unknown column 'field_title.count' in 'field list' (in wire\core\Database.php line 118) public static function getModuleConfigInputfields(array $data) { $data = array_merge(self::getDefaultData(), $data); $inputfields = new InputfieldWrapper(); ... $field = wire("fields")->get("title"); $field->type = $modules->get("FieldtypeRepeater"); $repeater = wire("modules")->get("InputfieldRepeater"); $repeater->name = "somethingUnique"; $repeater->add($field); $repeater->page = wire("page"); $inputfields->add($repeater); ... return $inputfields; } Any idea what I'm doing wrong, or how we could achive this?
  5. `randomBase64String` contains special chars which makes it impossible to activate via GET. I prefer something like this: substr(hash('md5', mt_rand()), 0, 100);
  6. Ok, good starting point, thanks so far! However, I think (also because of duplicate content) this approach is not the best. After a bit of research I found the perfect solution. Using a simple hook does the trick: http://processwire.com/talk/topic/1799-routes-and-rewriting-urls/?p=16708 wire()->addHookAfter('Page::path', null, function(HookEvent $event) { $page = $event->object; if ($page->template == 'account-profile') { $event->return = '/'.$page->name.'/'; } }); Anyway, thanks for the fast support and explanation! Cheers, Yannick
  7. Hi horst, thanks for the salutation and fast answer! At the first, I've to say that my php-skills are really restricted. It would be great if you could share a simple snippet, or further instructions how to switch to processing with /users/foo/ and how to process the request like you do it yet with /ca/. Just as a sidenote, I forgot to say that `http://localhost/projects/ca/` is where the pw-installation is located at and uses currently the default home-template. Thanks for your help in advance
  8. Ahoi, pros! Currently I've to create some frontend related user profiles. However I stuck at the routing part. All users are a child of a `users`-page and their url's look like this: http://localhost/projects/ca/users/foo/ ...I've to accomplish a url-structure like the following, so I tried redirect all these request to this: http://localhost/projects/ca/foo/ Using .htaccess doesn't work for me in this case: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /projects/ca/ RewriteRule ^users/(.*)$ $1 </IfModule> Any ideas how to get this to work, maybe without .htaccess?
×
×
  • Create New...