Jump to content

kaz

Members
  • Posts

    117
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    Munsterland

Recent Profile Visitors

616 profile views

kaz's Achievements

Sr. Member

Sr. Member (5/6)

17

Reputation

  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: 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 ?
×
×
  • Create New...