Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by kaz

  1. @kongondo I will try that, thanks!
  2. A question for the developers who work on multiple projects at the same time: When working localhost on several projects at the same time, must the /wire folder be placed in the project folder for each project? Or is there a solution for developers that works by with a single /wire folder? Maybe a link in the config to a fixed /wire folder outside a respective project folder? If the environment has anything in common with it: I use the MAMP PRO macOS development solution.
  3. @LMD In one template, that's a great solution. Thanks a lot for this, it works perfect.
  4. I need an if else or if or else to check the following: There is a field aside in each page. A simple info field where you can store info "We are on vacation …". The content is displayed only on this page. Next, there is a settings_aside field in the Global Settings, which is displayed on all pages. The fields are called this way: <?php if ($page->aside) { include('views/blocks/block-sidebar.php'); } else { include('views/blocks/block-sidebar-settings.php'); }; ?> I want, if no field is filled, then nothing is displayed. If both fields has content, the aside field on this page takes precedence. On all other pages the settings_aside content is displayed. block-sidebar.php <div class="uk-card card-bg uk-padding-small uk-margin-small-bottom"> <h6 class="uk-margin-remove uk-text-uppercase uk-text-normal" style="letter-spacing: 1px; margin-bottom: .5rem !important;"><span uk-icon="icon: info"></span> Aktuelles</h6> <?=page()->aside?> </div> block-sidebar-settings.php <div class="uk-card card-bg uk-padding-small uk-margin-small-bottom"> <h6 class="uk-margin-remove uk-text-uppercase uk-text-normal" style="letter-spacing: 1px; margin-bottom: .5rem !important;"><span uk-icon="icon: info"></span> Aktuelles</h6> <?php echo $pages->get('1032')->settings_aside; ?> </div> Roughly it works, but unfortunately not 100 %. Unfortunately the h6 of the templates are displayed. That means I would have to query the headlines via if else with the fields (!?). Just where? In the templates, or in the first if/else query?
  5. When I move over the map with the Magic Mouse, the map zooms in / out. Can this be deactivated, the finger movement should be for moving up and down the page ;)
  6. After every login I receive this mail: Hi kaz, You just logged in from a device we haven't seen you use before. Browser and Mac are always identical …
  7. @horst I have never used the combo field. This is interesting, I tried to test it. I have defined a combo field 'setting' with a few subfields, company (setting_company), name, street, and so on. I created a template with these field, and assigned it to a new page. The echo is not working, I can't get the data. No error message, it just keeps empty. echo $page->setting->setting_company; echo $pages->get('1052')->setting->setting_company; The first line (Using your Combo field from template files) I have from: ProFields: Combo field. How do you retrieve the data, from the page, from the template, from the field?
  8. 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?
  9. @Andy This works perfect, good job!
  10. @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;
  11. 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.
  12. @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();
  13. @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
  14. 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: 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 ?
  15. @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'); ?>
  16. 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.
  17. @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.
  18. 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.
  19. I have tried everything, I give up. The page works properly, the error is nonsensical, just a small blemish for the administrator.
  20. 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.
  21. @Chris Bennett I had already both entries in the config, the message remains. $config->timezone = 'Europe/Berlin'; setlocale(LC_ALL, 'de_DE.UTF-8');
  22. 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?
  23. 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= … ?
  24. 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?
  • Create New...