Jump to content

kongondo

PW-Moderators
  • Posts

    7,479
  • Joined

  • Last visited

  • Days Won

    146

Everything posted by kongondo

  1. I have searched the forums and couldn't find an answer. I am wondering how to use "OR" or || or | in my selectors in cases where I don't use either find() or get(). For instance, the following code does not work. Nothing is output. Why is that? if ($page->template=="home|basic-page") {echo "something";} // doesn't work Using | with find() and get() work just fine. Thanks.
  2. What a fun project! Horst, you totally rock!
  3. I've just tested and it works fine for me (English version). In the input field settings, it says that what is in the Date Input Format Code is automatically build from the date select above, unless you modify it. I have played with modifying it myself and letting PW do it for me and it still works...It accepts dots, dashes, slashes...Not sure why it's not working for you..
  4. Matthew, Thanks for this. Small typo, the last li -> a also has id= 2 instead of id = 3. Good example!
  5. @aren URL segments will accomplish what you want in that case. See the following links. Also search forums for "url segments" http://wiki.processwire.com/index.php/URL_Segments_in_category_tree_example http://wiki.processwire.com/index.php/URL_Segments http://processwire.com/talk/topic/3302-non-hierarchal-structure/ http://processwire.com/talk/topic/3275-hide-parent-page-from-url/ http://processwire.com/talk/topic/2822-url-segments/ Btw, maybe in future best to start own thread so that OP doesn't feel his/her post has been hijacked
  6. Not sure I understood, but this module by Ryan imports CSV files and supports importing of various fields. His site profile module possibly supports fields as well? Haven't used it, just reading this.
  7. There's a couple of ways to approach this. I can't find the forum posts atm but Ryan and others have addressed this before. One, it sometimes depends on how you have organised your pages (e.g. used sections or not?). On the other hand, some sites will have lots and lots of pages. Here, PW offers pagination. Btw, "several hundred" is not that much. Have a look at the skyscraper profile. I get your point though. However, in some cases, it does not make sense to have all your data as PW pages. This is especially in the case where those pages do not need individual URLs. For instance, a directory listing company employees. One could have this in their own database tables and have those called and displayed on one PW page. OK, back to some solutions. Have a look at this module by Soma.That can be customised to suit your needs. Going the custom database tables means you will miss out on the wonderful PW API. As for admin themes, as you know, creating your own admin theme in PW is a breeze..
  8. kongondo

    Boston

    Wow! Just seen this!
  9. kongondo

    Hi Everyone

    Thx...I was hoping I would have it up and running quickly but life got in the way...Hope to finish it soon...
  10. kongondo

    Hi Everyone

    Hehe....I guess I better get myself one then
  11. Jetag, I don't think you can access users' details in that way (I could be wrong though ). PW API already has $user variable. See the cheatsheet and the API page. For example $users->find("selector")
  12. Hi Nik & Teppo, Thanks for your responses. I think I didn't express myself clearly and got confused. What I was trying to do in the end is to be able to query an external database. Yes, in the example above I was querying PW tables. Aaah, I knew about PW start, limit and end selectors but thought they wouldn't do what MySQL LIMIT does. My understanding then is that if the tables are in PW, use PW selectors. If the tables are external, use PW database class (or other database abstraction layer e.g. ezSQL ), correct? Many thanks.
  13. OK. Thanks Diogo...I will go the $db-query way.
  14. Have a look here if you haven't
  15. You mean like this? So as to do this...If yes, there's a solution right on that post.
  16. This topic is similar to this but wasn't sure whether to post there or start a new thread. I have tried solutions posted there without success. I am trying to use the MySQL pagination feature LIMIT (range results, e.g. SELECT * FROM `your_table` LIMIT 0, 10 ) where I'll limit the actual results returned in a query. I cannot use PW "limit" since that will limit the total number of results returned. I am trying to use the MySQL LIMIT with PW API as follows but I'm getting errors. At the moment, I am trying to query a PW database as follows: $start = 0; $limit = 15; $values = $pages->find("parent=/"."LIMIT". $start ."," . $limit); How do I go about this? Many thanks. This is similar to what Soma does in the module DataTable as follows: $pa = $this->pages->find($selector."start=".$_REQUEST['iDisplayStart'].",limit=".$_REQUEST['iDisplayLength']); In this case he's getting start and limit values from an ajax request (I think). The idea is that more results (pagination) can be loaded on demand. Thanks.
  17. Have you given your editor the right to publish and unpublish? Have you also given them edit access rights to the home template?
  18. I like your idea and different people here actually customise the manager to suit their preferences/needs. However, I think this is one of those things that is left to the user to decide so that PW doesn't box you into any design. In fact, the default installation is just a demo page. In your case, you have need for a "maintain" section. Not everybody does. The beauty with PW is one can do what they wish with the manager as with everything else. Have a look at the different admin themes available for download here and you'll see what I mean. . One can even decide not to have a manager at all and PW will still run
  19. @Mark, Thanks for the explanation. I guess Shaun had to make a decision......and he decided to stay at SL.
  20. What was that again about PW API being jQuery-inspired? Yeah!, Write Less, Do More!
  21. This thread and this wiki page might help with explaining render(); Hope this helps
×
×
  • Create New...