Jump to content

choppingblock

Members
  • Posts

    49
  • Joined

  • Last visited

  • Days Won

    1

choppingblock last won the day on May 22 2013

choppingblock had the most liked content!

Profile Information

  • Gender
    Male
  • Location
    Essen, Germany

Recent Profile Visitors

3,544 profile views

choppingblock's Achievements

Jr. Member

Jr. Member (3/6)

34

Reputation

1

Community Answers

  1. Yes, a page would definitely have been the better choice... But the project is already live, so it's too late to change that. Unfortunately, I need the sorting before getting the PageArray. I hoped the parameters would work similar in the find() method... I'll check for updates then, maybe it will work in a future release. Thanks!
  2. Sorry for reactivating this old thread, but my current issue seems to fit here... I have a view with a table of orders. The items can be filtered and sorted, and are returned as a paginated result. Each order item has a property "order_status", which is of type "FieldtypeOptions". The sort order of the options differs from the IDs. To get the order pages, I am using something like $pages->find("parent=/orders, modified>=1472680800, limit=15, sort=-order_status"); This sorts by "order_status.id", but i would lilke to sort by "order_status.sort". However, I tried $pages->find("parent=/orders, modified>=1472680800, limit=15, sort=-order_status.sort"); but this seems to have no effect. Any ideas how this can be achieved? Am I missing something obvious? Thanks!
  3. Very useful and works like a charm. Thanks!
  4. I've always wondered what these are for... I think I have to go with a custom module though. I'm sure I'll be back soon with more questions. Thanks a lot for all the useful info!
  5. I think there should be an identifier field for the assigned user on the order ($page->user_id or something), so that each order knows to which user it belongs (many-to-one relation). I could fetch all orders of a user by $pages->find("template=order, user_id=$user"). Now I would like to have these orders listed under a new tab in each users template (in addition to the "Content" and "Children" tabs I get when I edit a user). I don't understand how the system templates are created. Except for the admin template, they don't even use template files. I can change the labels for existing tabs under "Advanced", but how can I add new tabs (and add custom content to them...)?
  6. Good point. So then I would create a page "orders" with restricted access, create reference-pages for each user who submits orders and store the orders as child pages of each reference page... - orders - - user_reference1 - - - order1 - - - order2 - - user_reference2 - - - order1 Now I just need to have these orders at hand when I open a user page... I think I'll figure that out. Thanks!
  7. I have started to use PW 3 in my latest project and it's working out really great (as expected). I have one issue though which I can't figure out. I am developing an order system, where users can log in, select a product, make some configurations to it and then order the product. The orders are saved as child pages to each user. So far, no problem. What I am trying to achieve is to put the orders in a subpage of the user called "orders", for better clarity in the users' structure. So i create a subpage "orders" with the first order of a user, and save the order as a child of this. - user - - orders - - - order1 - - - order2 - - - order3 The problem occurs when the user submits more orders: I can't get the "orders" subpage to put the new order inside it, so an additional "orders" subpage is created with each new order. - user - - orders - - - order1 - - orders - - - order2 - - orders - - - order3 This is my approach: // get the first child of the user page with the template "orders" // apparently this does not work as I expected and always returns a NullPage $parent = $user->child("template=orders"); // if "orders" subpage is a NullPage, create new page if ($parent instanceof NullPage) { $orderContainer = new Page(); $orderContainer->parent = $user; $orderContainer->template = "orders"; $orderContainer->title = "Orders"; $orderContainer->save(); $parent = $orderContainer; } $order = new Page(); $order->template = "product-configure"; $order->title = "Order: " . $order_name; $order->parent = $parent; $order->country = $country; $order->publication = $publication; $order->comments = $comments; $order->save(); Any hints are appreciated...
  8. Just to add my solution to this issue: I ran into this on a Basic Hosting Package on Strato (this is one of the biggest german discount Webhosters). None of the above workarounds worked for me, but then I found a hint in the Strato FAQ: I needed to disable the filter for guestbook-spam in the security settings, as this was causing a 503 Apache error.
  9. Found a workaround: I had the "Ready-To-Edit New Repeater Items" setting under "Details" set to "0". I set it to "1", now any new repeater is already published when created.
  10. I have an issue with a repeater field (PW 2.4). The repeater consists of three fields: title (text), body (textarea) and image. The repeater field only gets published when i put some text into the body field, otherwise it remains unpublished. Any ideas on this?
  11. Yep, same with me. In addition, I usually set up a website on a subdomain (like dev.mysite.com), and then switch it over to the main domain once everything is finished... but the subdomain is still displayed in the title in the admin area. I think this can be edited by overwriting $browserTitle in /wire/templates-admin/default.php Or is there another place where this can be done?
  12. There ara probably many different ways to achieve the result (nice solution though)... It's just a matter of convenience.
  13. I think most of us know that the wysiwig editors can be a pain if you want to input more than just some paragraphs... e.g. if you have to work with nested divs in the body of a page. So for some pages, the editor is best left switched off. Only solution i can think of at the moment is to create a new template, a new field for body content without editor, and assign the template to the page. Works, but is cumbersome. It would be extremely helpful if we could switch the editor on and off via field context settings. What do you think? Is this even possible?
  14. I have exactly the same issue. Very annoying... seems to be a bug in CKE. If anyone has any idea on what to configure or how to fix this (or at least where to start looking for the bug), that would really be great.
  15. Ah, I think I'm getting closer... this rule is where the path is appended for use in processwire RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] I solved it with a RewriteRule instead of a redirect RewriteCond %{REQUEST_URI} ^.*/new/(.*) RewriteRule ^new/(.+)$ http://www.newdomain.com/$1 [R=301,L] RewriteRule ^new/(.*)$ http://www.newdomain.com/$1 [R=301,L] I put this before all the other rewrite conditions. It redirects all requests containing the /new/ path to the new domain homepage, and also appends any path segments which might come after /new/. So www.olddomain.com/new/about/ becomes www.newdomain.com/about/ ...which is exactly what I wanted. Thanks for pointing me in the right direction! ------------------------------- Edit: the rewrite condition is not even necessary, and to execute the rule for just www.olddomain.com/new/, the + has to be replaced by a *. Yay!
×
×
  • Create New...