Jump to content

taotoo

Members
  • Posts

    43
  • Joined

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

taotoo's Achievements

Jr. Member

Jr. Member (3/6)

11

Reputation

  1. A bit off-topic, but I was thinking yesterday how in this situation it would be nice if you could also override field names. So when templating, instead of having the below (which is a bit meaningless when you come back to it later): $person->text3 $person->text1 $person->text2 You could instead have: $person->overview $person->quote $person->biography Maybe it wouldn't be possible/practical though.
  2. Would love to have this: From https://github.com/ryancramerdesign/ProcessWire/issues/1619 Referenced by this post: Icing on the cake might be:
  3. I'm an idiot - I was using the RestrictTabView module, with the View tab disabled for non-superusers. (Not sure why this wasn't also affecting the default uikit theme though).
  4. I've just tried the theme with a different website, and the issue isn't there. So it must be something unique to this site, and not the theme.
  5. Yes it works fine with the uikit theme, thanks for the help!
  6. Thank you for this theme - it's really excellent! Using a client account with restricted permissions, I noticed that when editing a page the View link in the main navigation bar didn't seem to work. I'm not sure if this is an issue with the theme, or something unique to my setup.
  7. Thank you for this code - it's very useful! One thing I noticed is that when a relevant page is sent to trash, that page doesn't have the option to restore from trash. I think this might be because when pages go to trash they appear to be renamed by ProcessWire. Removing the final line (uniquePageName) seems to solve the issue, but you lose that functionality of course. So based on a post of yours in another thread: ...I added an "isTrash" conditional, as below. Is this a reasonable solution or is there a better way? // Creature if($page->template == 'creature') { // Don't change name field if page is going to trash if(!$page->isTrash) { // If the fields that make up the title are populated if($page->colour->id && $page->animal->id) { // Set the title $page->title = "{$page->colour->title} {$page->animal->title}"; // Sanitize the title as a page name $name = $event->wire()->sanitizer->pageName($page->title, true); // Set the page name while making sure it auto-increments if there is a sibling page with the same title $page->name = $pages->names()->uniquePageName($name, $page); } } } });
  8. While trying to style the Page Tree and Lister in an attempt to make them look more similar to each other, I noticed that the color of the text in the lists of page titles didn't match. It turned out that the css above causes the Page Tree page list text to use monochromatic antialiasing (while everywhere else was using subpixel). This was happening in Chrome/Edge on Win10. Firefox on Win10 and Safari in a VM weren't affected by the issue.
  9. This module looks great! Should it work with the Reno theme, or are they incompatible?
  10. I find this module really useful - thank you for providing it! One thing I'm experiencing: if the field is a Page Reference field, the description heading gets repeated. These are both Page Reference fields: For comparison, these two aren't Page Reference fields, and display correctly:
  11. I too failed to get Strategy 2 working, but this does seem to work for me: RewriteCond %{HTTP_ACCEPT} !image/webp RewriteRule (.+)\.webp$ $1.jpg [T=image/jpeg,E=REQUEST_image]
  12. I've appended the following line from wire\modules\Process\ProcessPageSearchLive.php: $selectors[] = "start=$liveSearch[start], limit=$liveSearch[limit]"; Like this: $selectors[] = "start=$liveSearch[start], limit=$liveSearch[limit], sort=template|-created"; But rather than modify the original file, is it possible to achieve the same with a hook?
  13. I'm new to both too, but thought I'd chip in with the below as an alternative. May not be optimal, but it's how I've ended up doing things, coming from HTML. <?php $items = $pages->find("homepage_item=1"); ?> <div class="row mb-2"> <?php foreach($items as $item): ?> <div class='col-md-6'> <div class='row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative'> <div class='col p-4 d-flex flex-column position-static'>"; <h3 class='mb-0'>$item->title</h3> <?php if($item->arbitrary_publish_date): ?> <div class='mb-1 text-muted'><?php $item->arbitrary_publish_date; ?></div> <?php else: ?> <div class='mb-1 text-muted'></div> <?php endif; ?> <p class='card-text mb-auto'><?php $item->summary; ?></p> <a href='$item->url' class='stretched-link'>Continue reading</a> </div> <div class='col-auto d-none d-lg-block'> <svg class='bd-placeholder-img' width='200' height='250' xmlns='http://www.w3.org/2000/svg' role='img' aria-label='Placeholder: Thumbnail' preserveAspectRatio='xMidYMid slice' focusable='false'> <title>Placeholder</title> <rect width='100%' height='100%' fill='#55595c' /> <text x='50%' y='50%' fill='#eceeef' dy='.3em'>Check it out!</text> </svg> </div> </div> </div> <?php endforeach; ?> </div>
×
×
  • Create New...