Leaderboard
Popular Content
Showing content with the highest reputation on 08/05/2018 in all areas
-
Hello, here is example using HTML "li" tags for list, and CSS pseudo-classes for styling HTML. <?php if (count($page->authors)) { $out = ''; foreach($page->authors as $authors) { $out.= "<li><a href='{$authors->url}'>{$authors->title}</a></li>"; } echo '<ul class="author-list">'.$out.'</ul>'; } ?> And CSS part: .author-list { list-style-type: none; } .author-list li { display: inline; } .author-list li:after { content: "; "; } .author-list li:last-child:after { content: "."; } This example provide few options to style list inside CSS file only (inline or not, without bullets or not, various dividers etc.). Codepen demo Regards.3 points
-
Hello @Hajosch, you could also do something like this: <!-- Query of the authors --> <?php if (count($page->authors)) { echo "<u>AUTOR/EN</u>: "; foreach($page->authors as $authors) { echo "<a href='{$authors->url}'>{$authors->title}</a>"; if ($authors === $page->authors->last) { echo "."; } else { echo "; "; } } } ?> Regards, Andreas2 points
-
2 points
-
This one's not really new, but I forgot to post about it when I did it, plus there are still some unfinished aspects. I have a minimal personal invoice setup allowing me to have multiple identities for my invoices, to represent the different aspects of what I do (it's not all PW)... The child pages of an identity represent permissible payment methods for that identity... Of course, there are multiple clients under which invoice pages are stored, with highlighted status in the page tree... Invoices use repeater fields to store line-items and expenses. The line subtotal is calculated on save. The whole invoice value is worked out too. Profit and Loss is yet to be finished. And here's the result... I like PW!2 points
-
Welcome @AndreasWeinzierl, first of all I would recommend you to activate the debug mode inside your config file to get more informations about the error. Also you could install the excellent TracyDebugger to check your local installation for errors. This module saved me many time and I think it is a must have. Usually some hosters have issues with the RewriteBase. On those hosters you should set the RewriteBase in the .htaccess file to "/": RewriteBase / But with the hoster Strato this is not necessary. Most likely on your hoster Strato there is the SiteGuard write protection activated, which can cause issues. You should deactivate it for the directories where files need to be created and written (f.e. the assets folder). If none of this helps, there is a troubleshooting guide. Regards, Andreas1 point
-
You can also use some function like substr / str_replace or rtrim. https://stackoverflow.com/questions/5592994/remove-the-last-character-from-string You would have to build up a variable instead of echo-ing instantly to achieve this. i.e. use something like $output .= .... inside the foreach loop, then do the str_replace() and finally echo() it.1 point
-
This is now possible using owner selectors! http://processwire.com/blog/posts/processwire-3.0.95-core-updates/ $pages->find('template=repeater_collections_detail_images, your_repeater_field.owner.collections_detail_designer=123, include=hidden, sort=name');1 point
-
1 point
-
Everybody's currently hyping about Collabora CODE and editing OpenOffice, MS Office and PDF documents inside their Own-/NextCloud. Recently, a colleague wanted to know if it was possible to do that in our corporate intranet too. And so I thought, why not? So I have started dabbling with NextCloud and the Collabora docker image a bit and, after banging my head against the wall for a while (figuratively) and doing a lot of reverse engineering to wrap my mind around the wopi and lool stuff, I managed to include the LOOL leaflet in a page of my own making and load and save documents in it through a small PHP script. I'm starting to create a PW module from this that allows inline (more precisely: modal) editing of supported document types. The next steps: A small file abstraction layer that converts back and forth between WOPI-style file ids necessary for LOOL and PW file urls, provides locking and checks access permissions A file access token generator / verifier A WOPI REST endpoint library that handles all the actions needed for opening, saving, locking etc. and provides auxiliary information like user info, avatar etc. Finally, the module itself, containing both the WOPI endpoint logic that the Collabora image uses and the UI extension for InputfieldFile that creates the editor I'm going to get the basics set up, then I'll whip up a getting started manual that also documents the "missing links" that I had so much trouble with and finally push this and the code to github so anybody interested can contribute too.1 point