Jump to content

Jan Romero

Members
  • Posts

    680
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Jan Romero

  1. From what I understand, OR-groups are not needed here, since we only want to OR two values in the same field. Selecting login_end=1406930400|1416524400 works, so why doesn’t login_end=0|1416524400? 0 on its own matches empty datetime fields. The SQL error is "not unique table/alias", so that looks more like a bug. LostKobrakai’s solution is the best anyway, though.
  2. If you want to display the images in the admin page tree, this module should be what you're looking for. Or are you asking how to render images on your site? Try <img src="<?php echo $page->MyImageField->url; ?>" />. We will be able to help you better if you explain your template setup and your goal in more detail.
  3. Note that users are pages in processwire. You can see them in the page tree under Admin › Access › Users. The API shows you how to create a new user programmatically at the bottom of this page. If you want to attach more info to a user, you can probably modify the user template directly from the admin backend. Under templates, select Show system templates from the filter menu. Hope this helps you get started! edit: whoops, I somehow expected this to be markdown formatted
  4. Mmmh, I might have to buy one of those prints one day. The bold black and yellow reminds me of http://next.fontshop.com/. Very cool. Edit: although I must say, it's kind of annoying having to constantly move the mouse pointer out of the way when browsing the work pages. A more subtle mouseover would probably work better with images that big. Also, this page doesn't seem to work for me: http://www.nordenswansiirila.fi/en/work/vatt/
  5. Pages can hold references to other pages that go beyond the primary tree relationships with the field type "pages". You can think of them as foreign keys.
  6. The easiest way to link to one specific page would be by ignoring PW entirely and just typing href="/service/" in your template file. Slightly more complex, but giving you powerful advantages would be to grab the page with $pages->get(). You can pass the get function either the page's path as above, or its numeric ID, or a full blown selector string. Then you can use ->url on the resulting page object. At first sight this may seem like an overcomplication when you can just link to the path, but since it gives you the full page, you can make your link text multilingual or display whatever fields alingside it.
  7. The links you generated with <a href="<?=$property->url;?>"> don't go there? Where do they go then? Does the template "properties" have a php file associated with it? That's where you would echo the details using something like echo $page->myDetail;.
  8. I take it you're using UrlSegments for the categories in the parent template? The theory seems sound. There is probably some minor mistake in your parent template. If you post the relevant code that finds the child pages, we can have a look.
  9. Can you show the selector you use to get the pages that belong to one category? I'm not sure what your problem seems to be exactly. It looks like your content pages have a page field to select one or more categories, in which case you can filter by that field like so, where "categories" is the name of the field and $category is the category, whether it's a page object or an ID: $pages->find("categories~=$category"); If no page belongs to that category, nothing will be shown. You could also filter by the categories' titles like find("categories.title~=$string"). Also, you should probably use $category->url instead of $category->name in your category list.
  10. As a workaround, it’s possible to set Minimum Value to 0.1, since the field is actually an InputfieldFloat. This will allow values of 0 but no negative ones. Edit: as a matter of fact, changing the modules used for Min and Max in InputfieldInteger.module to InputfieldInteger (seems sensible anyway?), makes it work as desired, as far as I can tell. 0 values don’t disappear when set and the validation within templates works fine as well. Maybe this change is all that’s necessary?
  11. I get the same error when I try to $cal->find() a month that has an event spanning into it: Error Cannot break/continue 1 level (line 340 Events that continue beyond the loaded timespan are fine. That line goes as follows, and, judging from the comment, I don't want that functionality anyways, so I commented it out. Now my output looks good, although I'm not very comfortable with messing with the code... // filter out events that started before the requested time // these will be multi-day events that span into the requested time if($from && $a->from < $from) continue; The point in my code that throws the error: $items = $Calendar->find("from=$year-$month-1, to=$year-$month-$numdays, sort=date"); Otherwise everything is going super swell, thanks a lot for ProcessWire!
×
×
  • Create New...