Jump to content

ottogal

Members
  • Posts

    325
  • Joined

Everything posted by ottogal

  1. As I said - I don't know if PW selectors undergo short circuit evaluation or not. (And PHP is a programming language, isn't it?) I'm not familiar with the internals here; perhaps someone else can tell more.
  2. This could lead to different results when short-circuit evaluation is used. (But I don't know if this can occur with the Boolean expressions in PW selectors.)
  3. Hi Marco Ro, Just move it where you want to have it: <div class="Inputfield" id=""> <div class="InputfieldContent"> <input id="42" name="..." class="..." type="" maxlength="512" autocomplete="off"> <label class="InputfieldHeader" for="42">Email</label> </div> </div> Through the for attribute you assign the label to the wanted input element, refering to its id (here 42). That said, you should consider to avoid additional div elements and just use the semantic elements: <input id="42" name="..." class="Inputfield" type="" maxlength="512" autocomplete="off"> <label for="42">Email</label> This might be sufficient - of course that depends on your special use case...
  4. Hi shogun, in my opinion this is the essential key for the flexibility and freedom you have in ProcessWire, compared to other CMF/CMS. About scalability you should find a lot of positive threads here in the forums. In short: PW is the right choice!
  5. Sorry, I didn't count correctly. There are much less possibilities: 991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000 ?
  6. You have 99029007164861804075467152545817733490901658221144924830052805546998766658416222832141441073883538492653516385977292093222882134415149891584000000000000000000000000 possibilities to put the keys back... ?
  7. Marc Hinse aka @MadeMyDay really made my day: Many years ago when I (as an amateur, up to now) was just trying to get familiar with Joomla, he saved me through his (now legendary) rant against it, and soon he became "the" promoter of the (then promising) CMS Modx (Evo) in Germany. And just when I started to get uncomfortable with the "awsomeness" of MODX (Revo), he again saved me by his essay Why I chose ProcessWire over MODX wherein he hit the head of the nail with each of his arguments. And I liked his individual (graphic) design of his own website which was outstanding a bit from the "fashionable" way to do it. And it's the same now with the relaunch of his site: In a time when again most of the "modern" sites are looking quite similar to each other (as did most of the sites in former times), his design has a pinch of originality and stands out in it's freshness, comparing to the boring equality of so many other sites today. Kudos to Marc, and thank you! ottogal
  8. The <li> elements have to be children of an <ul> element (alternatively of an <ol> element). https://wiki.selfhtml.org/wiki/HTML/Textstrukturierung/ul (German) https://www.w3schools.com/tags/tag_li.asp
  9. To report back: The modules Page Protector and Protected Mode solve all my riddles. Thanks to @adrian for these fine tools!
  10. Indeed, that was my aim originally - I didn't want infect you with my confusion... In the meantime I decided to accept that user foo would have view (not edit) permission to all the public pages. Important is that no guest user has access to the special page XY. Many thanks for the help.
  11. Hi all, I'd like to give some feedback about the solution I ended up with. To bundle a few extra fields together with each image, instead of using a repeater I used the module ImagesExtra by @justb3a: https://github.com/justb3a/processwire-imageextra I created an ImageExtra field named imagex and added the following fields: startrow, startcol, widthcols, zindex They refer to a grid of rows and columns, each 2rem high and 2rem wide. startrow and startcol are the topmost row and the leftmost column covered by the image; widthcols is the width of the image, given as count of columns. zindex is the value of the usual z-index attribute to control which image is on top of the stack (in case of overlapping images). The picture below shows an image in the grid with the values startrow=2, startcol=4, widthcols=6 and zindex=1. The CSS grid is defined as follows: .wrapper { display: grid; grid-template-rows: repeat(60, [row] 2rem); grid-template-columns: repeat(40, [col] 2rem); grid-gap: 0; width: 80%; margin: 0 auto; padding: 0; } .wrapper div { width: 2rem; height: 2rem; } The CSS definitions for the images are embedded in the HTML code using a style element, allowing the use of php variables. (Note that the value of widthcols is used to calculate the width of the image in the unit rem, stored in the variable $wrem. The height is calculated automatically, keeping the aspect ratio.) The images together with the extra field values are stored in the field $imagex, and in the foreach loop for each of them the class definition is built: <section class="wrapper"> <?php if ($imagex) { $i = 0; foreach ($imagex as $pic){ $i++; $sr = $pic->startrow; $sc = $pic->startcol; $w = $pic->widthcols; $wrem = 2*$w . 'rem'; $zi = $pic->zindex; echo " <style> .no$i { grid-row: row $sr; grid-column: col $sc; } .no$i > img { width: $wrem; z-index: $zi; } </style> "; echo "\n<div class=no$i>\n"; echo "<img src=$pic->url alt='$pic->description' />"; echo "\n</div>\n"; } }; ?> </section> Works like a charm. Thanks again for all your hints and proposals!
  12. Hi all, for testing pusposes I created one single page using an own template. Now I want to create a user with a special role which gives view access just for that single page, not to all the other pages with different templates. The problem is that a new role always inherits the permissions of the guest role, hence view access to all pages. To deny the view permission for the guest role for all the other templates (but not the homepage) is not a way because guest users should view the site normally. Is there a simple solution for this case? I wouldn't like to install some complex module for this... Thank you for ideas!
  13. Suggestions: You could identify the HUMAN RESOURCES page as the first child of the root page: $page->rootParent->children()->first() Or: Add the background image to the rootPage and refer to it from the Office pages.
  14. Thanks for the hint - looks helpful.
  15. @jacmaes @entschleunigung @wbmnfktr @johndoe Thank you all for your efforts. I see that using grids is not so bad an idea. The repeater field option might be easier to handle for an not so savvy editor. I'll do some experiments...
  16. Thank you both. It seems I was not clear enough about the aim. I'm not talking about a masonry type of layout. The images should be freely positioned, indepentent of each other. So a grid solution seems not adequate.
  17. Hi all, given a template containing an Images field (with unlimited files allowed). Editing a page using this template, I'm looking for the ability to position the images freely (within a <section> element of the template - see the image). Is there a way to achieve this? Thinking loud: A CSS solution (with inline style) using position:relative and values for top and left would need these values to be saved as properties of the individual image... Or do I need some JS gallery able to do it? Any ideas are much appreciated.
  18. You could try $matches = $pages->find("template=expertsItem, location=$location, department=$department, sort=expertSurname")->not("department=2131");
  19. In the code fragment you showed of your template file there is no output of the image (like @louisstephens proposed). Without more information it is hard to help.
  20. Go to the tab "Details", under "Maximum files allowed" enter 1. Go to the tab "Actions" and assure to have ticked the checkbox of the template you want to have the header image in.
  21. If so, have a look to FieldsetGroups, too.
  22. The MultiValue Textformatter might be of interest for your use case. (I have no own experience with it, though.)
  23. Hi all, wanting to modify the CSS of a core module (JqueryMagnific in my case), but not to touch the files in \wire\, I found this older blog entry: https://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-copies-of-the-same-module That might be helpful for others, too. (It's pure fun using PW!)
×
×
  • Create New...