Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Images (or better all file fields) are always managed as multi value field, even if they pretend to be single as long as output-formatting is active.
  2. I would be nice if the "Edit Children Editor" would honor template family settings.
  3. <?php // An object is always equal to true in php. // For a PageArray do check for the number of elements. // For a Page one would check for the id. if ($page->blog_category->count()){ echo"Posted under: "; foreach($page->blog_category as $cat){ echo"<a href=\"{$cat->url}\">{$cat->title}</a></li> "; } } // Else do nothing. Not even loop though an empty array @Mike Rockett When using the new wire api function than do it the right way: echo "Posted under: " . $page->blog_category->implode(", ", function($cat) { return "<a href=\"{$cat->url}\">{$cat->title}</a>"; });
  4. You need to edit the ProcessProfile module. There you can chose out of the template's fields which one are visible.
  5. You should really use the permission system instead of trying to overwrite behavior all over the place. It's build for that. The Dynamic-Roles module let's you assign access to pages depending on more dynamic rules than just the viewed template. As soon as the view access to pages is gone a user cannot access them in any way as long as you're not explicitly allow it. You can for example add a page-field to the user, which holds all the rootPages the user has access to. Than you'll have a dynamic role for each client, which gives all users, which have the right rootPage present in that field access to the whole tree. As soon as you've access to the root page the user can also see all subpages, if the access is granted by the template access management.
  6. Nope, the hook is explicitly only called if a page is getting published.
  7. // "new user()" needs to be "new User", because classes do begin with uppercase char // Also do you really want to create a new user object for each field? $inputfield = $fields->get($field->name)->getInputfield(new user());
  8. In wire/templates-admin/scripts/inputfields.js you can set debug mode to true (first view lines). Please have a look at what this is does print to the console.
  9. You're missing all the "wrapper" classes needed for requireIf to work. Maybe take a look at the pw rendered output to see those.
  10. If the requireIf selector is correct (maybe radios do only match by value and not the label) than this should work. The js doesn't care how the fields are set up if the pieces fit together.
  11. I think it's more suitable as default behavior to expand. It's looking more cohesive and sometimes one even doesn't want the user to notice the missing field. But I like the behavior more for two-column views. For three I'd rather have both columns expand the same size instead of only the second one expanding.
  12. It's Pages::published. I've corrected it already in my previous post, but it seems you didn't notice.
  13. How about using the Pages::published hook? He's saving "another" page, so nope, it's needed there.
  14. The thumbnails sure are a bottleneck, but as we now both know, that's not the case for a file field. The only potential bottleneck for a file-field could be, that the inputfield will load all your files to show them, which is not only a large list, but also lots of data.
  15. I think a file field could handle that in an acceptable manner (no thumbnails there), but I doubt the loading-time on page-edit will be sufficient. I'd think you'd need something paginated (maybe filterable) to control such an amount of data. Edit: If you really need only the upload and nothing else, then I'd use a custom inputfield for fieldtype file, which doesn't load all the images at once, which is most likely the biggest issue to solve.
  16. The descriptions are working here. Also I'm not sure why your description is after the images. It should be before the grid.
  17. I just find the gap to be to less noticeable. It doesn't necessarily have to be a gap, it could also be a bar of color, which indicates the current drop position. As the drag&drop seems sometimes a bit touchy I feel it's important to at least show clearly the place where the image will get dropped.
  18. It's not the same. In the default theme it's a full image's width of added space, while in Reno it's only 10 or 20px.
  19. In the images grid-view the ghost element, which keeps the gap between images while drag&drop-ing, seems far to small for me.
  20. Very nice looking site as always. Some minor things, which could be improved. The grid view of the slideshow seems to be incomplete for certain screen sizes (1220x1340 viewport) and in this case the thumbnails are also to small (~370x300 block with 250x167 image). That doesn't look good even without a retina screen. And the last thing: I'd close the grid view, when the actual page is getting moved back in again.
  21. You can always fill in data to a template, as the form for that is generated automatically. Only on the frontend this page should be empty (at least have no content if you have prependTemplateFile or appendTemplateFile enabled in the config.php). Templates are only the blueprints to convert the data, that you've saved to a page in the backend, to html code or really any other format you want it to be in. I'm not using any of those. Just try them out and see which one you like more. Today almost all of those editors do well on basic features, so it's mostly a case of personal preference and maybe advanced features not necessary in the beginning.
  22. The language shown to anonymous visitors is always the language, which is set in the "guest" user. So if you don't want them to see the default language go edit this user to your preferred default language. You could also use the language already installed when enabling language support and just change the label. The "default" language is mandatory and cannot be deleted, therefore you can just use it as your "main" language, even if it's not english.
  23. From your explanations I'll conclude your new to programming, at least in php. I'd would advise you to first try some basic entry-level php tutorials, before moving on with processwire, as you won't get far without a basic understanding of php as programming language. To create those php files I would suggest you to use a real programming text-editor (notepad++ is quite nice for beginners, but there are plenty of other ones). This will get you syntax highlighting an other useful features, which help you to find the inevitable errors you'll be making in the beginning. About your more specific questions. The folder to put your files into is …/site/templates/ from the root of your processwire installation. I don't know where you installed processwire, but this can be done locally as well as on a server. As long as a template – created in the backend interface – doesn't have a corresponding template.php file in that folder you cannot view that page in the frontend as processwire won't know how to display the data you filled out in the backend. So about your new page, which did display data: I think that you created a new page of a template, that was already preinstalled by processwire. Those preinstalled templates do also already have corresponding template.php files in place and therefore show up in the frontend. The guide is there to tell you how to move further by creating own templates, that look different from what's already installed. P.S. Please do not open new threads if you've already one about kinda the same issues. Also please try to avoid writing in uppercase text.
  24. That would be reasonable enough. I think there's no need for something more elaborate.
  25. Translatable strings each need to be on their own line to work, as it's noted here: http://processwire.com/api/multi-language-support/code-i18n/#there-may-only-be-one-translation-function-call-per-line
×
×
  • Create New...