Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by dragan

  1. Thanks! In the end, this worked: $p = $pages->find("portfolio_categories=$page, template=portfolio, sort=-Project_Date"); foreach($p as $pp) { echo "<a href='{$pp->url}'>{$pp->title}</a><br>"; } I'm still a bit puzzled why the other method didn't work. So is $page some sort of short form for $page->title? Guess it must be, because it wouldn't work otherwise. On the other hand, for these category pages I'm only using the title field, nothing else.
  2. I've created a couple pages that hold nothing more than categories - referenced by portfolio pages. The multi-select page fieldtypes work just fine. Now I'd like to find all pages that have category X. Since most items have more than one category, I need selector operators like %= or *=. But these simply don't work. e.g. $cat = $sanitizer->selectorValue($page->title); // works // none of these work: $p = $pages->find("portfolio_categories*=$cat, template=portfolio, sort=-Project_Date"); $p = $pages->find("portfolio_categories%=$cat, template=portfolio, sort=-Project_Date"); $p = $pages->find("portfolio_categories*=$cat"); produce the error messages I've uploaded as attachment below. Do I have a buggy mySQL version installed? Other basic selector queries (foo=bar) work fine...
  3. Oh dear... please someone delete this thread What a shame, TGIF
  4. I'm getting my feet wet with PW... Today I'm trying to build a basic portfolio site. One of the things I need are categories. I know by now how to accomplish this. However, while creating pages and doing tests, I wondered: Is there a special module that allows you to move several pages at once? Batcher doesn't have this, as far as I can see. Also, is it correct that with the current default "move" action within the pages menu, you can't put a page inside another page i.e. container page? You can always just move one page at a time within the same hierarchy level. I think it would be a very nice-to-have feature in the admin section (or as an optional module). I also looked up the database: "pages_parents" would probably be the place where to manually change parents via SQL. But I'm not sure how to use that, when there are multiple parents, i.e. a container-page is nested inside one or two other pages deep. Perhaps there's a tiny little thing I've been missing? Would you rather use the API to set a new parent for dozens of pages?
  5. Thanks! I'm really amazed how fast responses pour in here @ PW forums. Feels good to become part of such an awesome community. I guess I'll completely redo two sites with PW, that were originally built with another CMS (playing around with dummy data is not so appealing for me - a real-life scenario is always much better for learning the ropes, as far as I'm concerned.)
  6. Is there a full list of directories / files that need write permissions anywhere? Or are the two mentioned the only ones?
  7. Thanks! I'll look into these the next couple days.
  8. Hello everyone, I'm a PW newbie. Overwhelmed from all I've seen and tried out the last few days. My CMS of choice the last couple of years has been MODX. Other than that, I am working as a frontend and backend developer since over 10 years. Having so much freedom to work directly with PHP inside a CMS / CMF is a relief. No new pseudo scripting language one has to learn (as in Typo3), no unnecessary restrictions or bloat. So, my first general question: If I have an existing dataset in mySQL, that I would like to manage with PW (i.e. inside the admin area of PW) - how would I most likely do that? I know I could export the database tables to PW pages. But what if I wanted a database CRUD system inside the PW area? In MODX "Evo" you could build a custom module for such things. You know - phpMyAdmin is over the top for most clients, and an admin section with a different login and URL is clutter. How can I extend the PW backend? Is it possible to include an off-the shelf CRUD script somewhere? Is that not possible with PW? Or frowned upon? I'm just trying to see what the "best practises" are for these kinds of scenarios. Thanks for explanations, tips and pointers.
  9. Thanks a lot for this tutorial. I'm a PW newbie (coming from MODX), and naturally, every piece of real-life examples and how-tos are welcome. I have one question: How exactly was this accomplished? In the admin section, did you create a text-input and just entered other page ids? Or to put it in other words: Is there a special input-field that lets you select one or more PW pages? (radio buttons, select field, checkbox or whatever).
  • Create New...