Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. @renobird We planned to do a view things with it: Put the field a 'repeater like field' to allow a user to set the columns for ListerPro. Build stylesheets for the visuals for listerPro. Changing Field labels within ListerPro. The Fieldtype will be used inside other Modules, where you want to give the user some 'controlled access' to field properties.
  2. FieldtypeFields Fieldtype for storing field references with various filter possibilities. See Modules directory Download at GitHub
  3. Hi @szabesz, looks like it's working with the default ProcessPageLister (not much testing over there.)
  4. ProcessPageListerUrls Create links to specific ListerPages with predefined selector, column and sort settings. See GitHub for more information. Download ProcessPageListerUrls on GitHub
  5. I have a slightly different pattern as @adrian & @Macrura, this way there are no un necessary whitespace characters in HTML $out = "<div class='uk-grid uk-grid-large'>" . "<div class='uk-width-medium-1-3'>" . "<div class='uk-panel uk-panel-box prodotto__panel-mod'>" . "<div class='uk-panel-teaser'>" . "<div class='uk-cover-background' style='background-image: url(" . $page->product_image->url . ");'>" . "<img class='uk-invisible' src='" . $page->product_image->url . "' width='600' height='400' alt='Placeholder'>" . "</div>" . "</div>" . "</div>" . "<a class='prodotto__panel-links prodotto__panel-links-blue' href='" . $page->url . "'>" . "<span>Discover more</span>" . "</a>" . "</div>" . "<div class='uk-width-medium-2-3'>" . "<div class='prodotto__descr'>" . "<span>" . $page->product_options->title . "</span>" . "<h3 class='shadow-blue'>" . $page->title . "</h3>" . "<p>" . (truncateText($child->product_description)) . "</p>" . "<p>" . "<a href='" . $page->url . "'>" . "<i class='uk-icon-chevron-circle-right uk-margin-small-right'></i>Link". "</a>" . "</p>" . "</div>" . "</div>" . "</div>";
  6. Awesome tips that solves your dot filename issues, I want to throw in an other approach so you won't have that issue that often. When you change the user that runs apache, the ProcessWire install wil handle the renaming of the htaccess among other things. I only recommend this when you are the only user on your mac that uses the internal apache. Changing the user is quite simple: Go to /etc/apache2/httpd.conf, find the block that looks like the block below, and change the user and the group to your short username and the group. In the example I already did that with my name. After changing that name, restart apache and apache will run with You as user. this will solve a lot of user right issues. <IfModule unixd_module> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # # User _www # Group _www User martijn Group staff </IfModule>
  7. There's a typo in the example I've given, it's not $this->modules, but $modules in template context. $items = $pages->find("template=event, limit=100"); $items->setTotal($items->count())->setLimit(10)->setStart(0); $pager = $modules->get('MarkupPagerNav'); $pagination = $pager->render($items); echo $pagination;
  8. Take a look at @LostKobrakai's post: But don't set a new Page array, but use the pagearray you want to use.
  9. Is is possible to hook on file added and place a htacces in it when not already exists? or do I misunderstood your question alltogether... file_put_contents('/path/to/the/specific/assets/folder/.htaccess', "<Files *.*>\n\tdeny from all\n</Files>\n");
  10. The view tab is hookable so you could do a before hook and change the property of that hook. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module#L898
  11. Something like this ?: $id = $page->id; $pid = $page->parent->id; $locationData = $page->get("LocationData"); $relatedPages = $pages->find("parent=$pid, id!=$id, LocationData=$locationData");
  12. DOMContentLoaded has alot of pitfalls, browser compatibility etc etc. Why not use jQuery ready or call the script manually after the id app is in the dom.
  13. Variables in single quotes will not be processed. Use double quotes when using variables in selectors.
  14. I think that context can't access the $config variable. You could try wire('config')... What else: I'm not fully 100% sure that "template="..." would work you could also try "template.id="...".
  15. Hi @Peter Knight, first of all: sorry I didn't seen your message before (Still not really used to the new forum I guess). Ok, I installed a clean ProcessWire 2.8.29, installed FieldtypeSelectFile and everthing looks fine from here. Are there steps for me to reproduce the error? And did you pressed submit on the module-info interface? (/processwire/module/edit?name=FieldtypeSelectFile)
  16. I've made a module that should swicth protocols (http/https) based on domain name. Don't now if it still works but you could try it: https://github.com/Da-Fecto/SwitchProtocol
  17. Don't know... could be. Maybe give the next a PageArray? $layout->next($layout->parent()->children())->article_overview_flexible_layout_type->id;
  18. Aaah... I never use that option field. Why not settle for real pages? They are more flexible.
  19. Your ID's look suspicious to: ID 1 = Home page ID 2 = Home page of Admin ID 3 = The ProcessWire Pagelist ID 4 = Doesn't exist in ProcessWire Also want to mention that those admin pages by default only have a process and a title field.
  20. Don't know? Cache, loggedin state? Never-the-less, the syntax looks incorrect.
  21. When next doesn't exists, then the next page is probably a null page. The null page definitely doesn't have a field called 'article_overview_flexible_layout_type', thus the property id doesn't exist.
  22. Yes, you could do all the above. I don't know what you're after with those external databases, but in most cases I think it's not convenient to have separate models to work with. Keep in mind that working with hundreds of thousands of pages (data containers) in ProcessWire is no problem. I haven't seen real performance issues for sites with more than a million pages. On the other hand, ProcessWire is just executing PHP so if you wish to use external databases you go can go for it.
×
×
  • Create New...