Jump to content

kaz

Members
  • Posts

    225
  • Joined

  • Last visited

Everything posted by kaz

  1. How do you set up global settings? I did it this way: I do a template settings (without php file). I made fields, company, name, city, phone, ... which are included in the template. Then I created a Settings page in the Tree with the Settings template, and declared the page as Hidden in the Page Settings. I retrieve the content via page ID. Is this a common way? How do you implement global settings?
  2. @Andy This works perfect, good job!
  3. @Andy Unfortunately, I could not find a solution with it to remove the link to the Global Setting either. At my complete code no URL is called at any point, I think that the module adds the link uncalled. Why, I have no idea. <?php $options = array( 'popupFormatter' => function($page) { $out[] = "<strong>Company</strong>"; $out[] = "Street"; $out[] = "ZIP City"; return implode('<br/>', $out); } ); echo $map->render($pages->get('1028'), 'settings_location', $options); ?> If someone like me calls the data from Global Settings I would appreciate your feedback. How did you defined it? // Edit: I find a solution in a post from 2017: In MarkupLeafletMap.js, I changed the code marker.bindPopup("<b><a href='" + marker.linkURL + "'>" + title + "</a></b>" + extra); to marker.bindPopup("" + extra + ""); Then the line breaks: extra = '<br />' + extra; to extra = '' + extra;
  4. It's a good consideration. I set it up this way: I have a base template. In it I load per include the news template. The news template has only the code I need to display the articles. I only have a summary, because I didn't manage to build the whole thing including a detail page. I have activated Allow Page Numbers only in the included news template.
  5. @netcarver I have the same result with this code (plus an additional unformatted list above the pagination? $results = $pages->find("limit=5, template=news, sort=-publish_from"); echo $results->render();
  6. @netcarverAllow Page Numbers was already activated. Without activation the pagination would not work (!?), but it works. Only the link to the pages, the URL, I think is wrong <a href='{url}'><span>{out}</span></a>. The link is surely not wanted like that: ?page=2
  7. I have for a news site (Lister Pro) a pagination with MarkupPagerNav. $results = $pages->find("limit=5, template=news, sort=-publish_from"); echo $results->renderPager(array( 'nextItemLabel' => "vor", 'previousItemLabel' => "zurück", 'listMarkup' => "<ul class='MarkupPagerNav uk-margin-medium-top'>{out}</ul>", 'itemMarkup' => "<li class='{class}'>{out}</li>", 'linkMarkup' => "<a href='{url}'><span>{out}</span></a>" )); The pagination is displayed but does not work. The link is output as follows: http://192.168.64.2/news/?page=2 When I click the link, the same page is reloaded, not page 2. I have 7 entries, with limit 5, 5 entries are correctly displayed on news page 1. I am worried about the news/?page=2, shouldn't it be news/page2 ?
  8. @diogo I have no output. Simply nothing happens … <?php echo setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8', 'de_DE@euro', 'de_DE', 'de', 'ge'); ?>
  9. I'm sorry: The echo has no output, not in frontent, not in source code. My entry in C is: de_DE.UTF8, de.UTF8, de_DE.UTF-8, de.UTF-8 localhost is: // setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'en_GB.utf8', 'en.UTF-8'); setlocale(LC_ALL, 'de_DE.UTF-8'); I work localhost with XAMPP, macOS. I have no experiences with SSH. Sorry about giving up. But when I don't see a change, then perhaps I give up too quickly.
  10. @diogo it does not work, the error remains. No matter what I do, it doesn't change anything. The problem is probably in my system? Thank you for trying to help, but I don't want to try any more.
  11. C This was already done before I posted the article, the entry C is de_DE.UTF8, the default language. All entries are included. de_DE.UTF8 in 'C' Translate LanguageSupport.module, setlocale(LC_ALL, 'de_DE.UTF-8'); in config.php The error message remains.
  12. I have tried everything, I give up. The page works properly, the error is nonsensical, just a small blemish for the administrator.
  13. I did try it with: setlocale(LC_ALL, 'de_DE.UTF8', 'de.UTF8', 'en_US.UTF-8', 'en.UTF-8'); in config.php + cleared cache Then I tried adding the setting of the languages in the Translate LanguageSupport.module: de_DE.UTF8, de.UTF8, en_US.UTF-8, en.UTF-8 + cleared cache I have restored the entry in the config to setlocale(LC_ALL, 'de_DE.UTF-8'); The error message remains. Perhaps a short explanation of the page: I have replaced the default language to German, including installation of the language packs. A second language is not installed yet, is planned for later. The fields of the templates are already set to *Language, because it was possible after installing the language, a step in preparation for the second language.
  14. @Chris Bennett I had already both entries in the config, the message remains. $config->timezone = 'Europe/Berlin'; setlocale(LC_ALL, 'de_DE.UTF-8');
  15. At admin login the following message is displayed: Hinweis: Ihre aktuelle Server-Locale-Einstellung funktioniert nicht wie erwartet mit dem UTF-8-Zeichensatz und kann kleinere Probleme verursachen. Ihre aktuelle Gebietsschema-Einstellung ist "en_US.UTF-8". Bitte übersetzen Sie die "C"-Locale-Einstellung für jede Sprache in die kompatible Locale in /wire/modules/LanguageSupport/LanguageSupport.module: Default Beispielsweise könnte die Gebietsschema-Einstellung für US-Englisch lauten: en_US.UTF-8 Note: Your current server locale setting does not work as expected with the UTF-8 character set and may cause minor problems. Your current locale setting is "en_US.UTF-8". Please translate the "C" locale setting for each language to the compatible locale in /wire/modules/LanguageSupport/LanguageSupport.module: Default For example, the locale setting for US English might be: en_US.UTF-8 In the page header I have this: <!DOCTYPE html> <html lang="de"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> in config: // Locale setting setlocale(LC_ALL, 'de_DE.UTF-8'); The error message remains, even if I set the entry "C" under Default (the link in the error message) to de_DE.UTF-8 or en_US.UTF-8. Maybe I have to set a code for language selection in the header, instead of <html lang="en">? What did I forget?
  16. I have done news with Lister, the summary is output via foreach. <?php foreach($pages->find('template=news, sort=date') as $item): ?> I would like to open the full article via <p><a href="<?= $item->url ?>">read more</a></p> into another detail template (news-detail), which I have created. Is there a way to open the $item content in a different detail template, perhaps a second 'template= … ?
  17. I have a lister in my menu, and do not want to display their child pages. Can I disable the display of levels for single pages?
  18. @elabx that's so easy, wow
  19. My lister is under pages (Uikit admin theme). Can a lister also be placed in the top main menu? https://i.imgur.com/eN94Rp0.png
  20. I coded breadcrumbs (I know, only two levels) with a simple code. Because titles are usually too long for breadcrumbs I added menutext to the first level (Home): <?php if ($page->id == 1 ): ?> <ul class="uk-breadcrumb"> <li><span><?php echo $page('menutext|title'); ?></span></li> </ul> <?php else: ?> <ul class="uk-breadcrumb"> <li><a href="<?php echo $page->parent->url; ?>" title="<?php echo $page->parent->title; ?>"><?php echo $page->parent->title; ?></a></li> <?php if ($page->title): ?> <li><span><?php echo $page->title; ?></span></li> <?php endif; ?> </ul> <?php endif; ?> In the first level it works fine, I see 'Home' instead of 'Welcome on our …' The echo does not work for the parent layers: <?php echo $page->parent('menutext|title'); ?> This is surely because two -> occur? How to insert menutext correctly for parent pages.
  21. @rick I meant code (css, php, …) changes, not content. For example, if I try a change in the footer: <footer class="bgcolor-secondary"> to <section class="bgcolor-primary"> Nothing changed in the source code of the browser, in Safari, Chrome and Firefox. I clear the cache, no change, I restart the browser, no change. I have used MAMP and MAMP Pro (demo). Because I couldn't find a better idea, I have deleted MAMP / Pro from the Mac, and installed XAMPP. I previously saved the layout with ProcessExportProfile. Then I reinstalled Processwire with that profile, and yes, now I see changes when I refresh the browser via cmd + r, it works! I don't know why it behaved this way in MAMP, I worked with MAMP many years ago with ver. 1+2, I haven't used it since. In XAMPP it works now, so I simply forget about the problems with MAMP.
  22. @BitPoet I activated the lines in php.ini (php7.4.12), they were commented: opcache.validate_timestamps=1 opcache.revalidate_freq=0 Settings: Cache was "off", I changed it to "OPcache", due to the change in php.ini Unfortunately nothing changed. Changes will only be visible after a "save" in the editor. I have installed a module, Cache Control. Even "clear all" makes no difference in the frontend. I guess I have to live with it.
  23. @elabx I run localhost:8888 with MAMP (Mac). I don't use developer tools, it is a simple PW blank installation.
  24. @wbmnfktr I just use the CMS without any changes to the cache. @rick Great, I will try the no-cache for the time of development.
×
×
  • Create New...