Jump to content

kaz

Members
  • Posts

    168
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    Munsterland

Recent Profile Visitors

927 profile views

kaz's Achievements

Sr. Member

Sr. Member (5/6)

23

Reputation

  1. Exactly, that was my goal, to do it in the base template. Thanks that works!
  2. @netcarver thanks netcarver, this helped a lot. echo "<ul id='side-menu' class='uk-list uk-margin-remove uk-padding-remove'>"; foreach($pages->get(1044)->children as $child) { $active = wire('page') == $child ? "current" : ""; echo "<li class='$active'><a href='$child->url' title='$child->title'>" . $child->get('menutext|title') . "</a></li>"; } echo "</ul>"; I call the list pages in my base template with the page ID of the parent page: <?php if ($page->id == 1044): ?> <?php include('views/partials/menu-aside.php'); ?> <?php endif; ?> However, the list should also be displayed in all children's pages. ID is therefore wrong? Is there another option which includes the children's sites?
  3. sorry, a typing error: mengtest = menutext ('menutext|title')
  4. I need to list subpages by mengtest and title of a mother page as a simple foreach ul list. Is there a way, similar to a menu, to list child pages? I couldn't find anything about this in the docs. Maybe you can give me a hint what to look for?
  5. kaz

    Site url?

    When I use echo $page->httpUrl; I get the config url's, for example: domain.com,www.domain.com, what is just included in the config How do I get only one complete root URL incl. https:// maybe for <base href="<?php echo $urls->…; ?>" />
  6. It doesn't work, probably it's just too much 'if' in too many files? The modal window is not displayed, but exists in the source code of the browser. It is hard to describe, why it does not show up. So I just leave the error message, because it works with these error, although not clean. I removed the space before .show(), it makes no difference. PS: It's hard to test, because the popup appears only once :) that's why my reply took so long.
  7. I load the UIkit scrips before UIkit.modal. Perhaps I'm misunderstanding something, have a look at the post from September 3. The error message appears only if the field settings_modalwindow has no entry. If the field has an entry, it works. That's why I thought it would be necessary to query both?
  8. I have a little error (code inspector) message due to the double if query: Uncaught TypeError: UIkit.modal(...) is undefined <anonymous> https://localhost:8890/:240 In the prepend / append files I have these code: prepend: <?php if ($global->settings_modalwindow): ?> <div id="modal-center" class="uk-flex-top" uk-modal> <?php echo $global->settings_modalwindow; ?> </div> <?php endif; ?> append: <?php if ($page->id == 1): ?> <script> let infoShown = localStorage.getItem('infoPopup'); if(!infoShown) { UIkit.modal('#modal-center') .show(); localStorage.setItem('infoPopup', 1); } </script> <?php endif; ?> The error message is generated by the code in the append file when the settings_modalwindow field has no content, but the code is still loaded. I would need to query both ID1 and whether the field has content. Is it possible to query both at once?
  9. @flydev ?? unfortunately it did not work edit: a typing error, I revise: it works! if ($page->hero_items->count):
  10. @bernhard Good idea, but: I have tested TracyDebugger, it is too complicated for me.
  11. I have a repeater field hero_items that I use for hero images. If no image is uploaded, an image field (settings_hero_image) from the global settings should be displayed. Unfortunately that does not work. The code for the data is correct. If the parts are single (hero_items or settings_hero_image) the images will be displayed. If no image is uploaded under hero_items, the browser code looks blank. Actually, else should now be displayed. If images are uploaded, the source code is correct. What is wrong with my if else query?
  12. @Andi I will try that, thanks!
  13. I' ve changed the PHP version localhost from 7.4.21 to 8.1.1. When I make a change in the editor (e.g. in pages), this error message comes up: Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.module:193 #0 site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.module (193): round('', 4) #1 wire/core/Wire.php (417): Processwire\InputfieldLeafletMapMarker->___processInput(Object(WireInputData)) #2 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #3 wire/core/Wire.php (485): WireHooks->runHooks(Object(Processwire\InputfieldLeafletMapMarker), 'processInput', Array) #4 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #5 wire/core/Wire.php (417): InputfieldWrapper->___processInput(Object(WireInputData)) #6 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #7 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldFieldsetOpen), 'processInput', Array) #8 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #9 wire/core/Wire.php (417): InputfieldWrapper->___processInput(Object(WireInputData)) #10 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #11 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldFieldsetOpen), 'processInput', Array) #12 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #13 wire/core/Wire.php (417): InputfieldWrapper->___processInput(Object(WireInputData)) #14 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #15 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldWrapper), 'processInput', Array) #16 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #17 wire/modules/Inputfield/InputfieldForm.module (189): InputfieldWrapper->___processInput(Object(WireInputData)) #18 wire/core/Wire.php (417): InputfieldForm->___processInput(Object(WireInputData)) #19 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #20 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldForm), 'processInput', Array) #21 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (2203): Wire->__call('processInput', Array) #22 wire/core/Wire.php (417): ProcessPageEdit->___processInput(Object(InputfieldForm)) #23 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #24 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessPageEdit), 'processInput', Array) #25 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (2009): Wire->__call('processInput', Array) #26 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (563): ProcessPageEdit->processSave() #27 wire/core/Wire.php (414): ProcessPageEdit->___execute() #28 wire/core/WireHooks.php (951): Wire->_callMethod('___execute', Array) #29 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessPageEdit), 'execute', Array) #30 wire/core/ProcessController.php (337): Wire->__call('execute', Array) #31 wire/core/Wire.php (414): ProcessController->___execute() #32 wire/core/WireHooks.php (951): Wire->_callMethod('___execute', Array) #33 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessController), 'execute', Array) #34 wire/core/admin.php (160): Wire->__call('execute', Array) #35 wire/modules/AdminTheme/AdminThemeUikit/controller.php (15): require('/Users/dylan/Si...') #36 site/templates/admin.php (15): require('/Users/dylan/Si...') #37 wire/core/TemplateFile.php (327): require('/Users/dylan/Si...') #38 wire/core/Wire.php (414): TemplateFile->___render() #39 wire/core/WireHooks.php (951): Wire->_callMethod('___render', Array) #40 wire/core/Wire.php (485): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #41 wire/modules/PageRender.module (575): Wire->__call('render', Array) #42 wire/core/Wire.php (417): PageRender->___renderPage(Object(HookEvent)) #43 wire/core/WireHooks.php (951): Wire->_callMethod('___renderPage', Array) #44 wire/core/Wire.php (485): WireHooks->runHooks(Object(PageRender), 'renderPage', Array) #45 wire/core/WireHooks.php (1059): Wire->__call('renderPage', Array) #46 wire/core/Wire.php (485): WireHooks->runHooks(Object(Page), 'render', Array) #47 wire/modules/Process/ProcessPageView.module (184): Wire->__call('render', Array) #48 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(Page), Object(PagesRequest)) #49 wire/core/Wire.php (417): ProcessPageView->___execute(true) #50 wire/core/WireHooks.php (951): Wire->_callMethod('___execute', Array) #51 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array) #52 index.php (55): Wire->__call('execute', Array) #53 {main} thrown (Line 193 in site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.module) I set back the PHP to 7.4.21, now I don't have an error. Just for information for the developer, PHP 8 is causing problems, at least for me. Maybe it's only me?
  14. if we know "how"; thanks for your support!
  15. Sorry for the confusion. Both are loaded above the closing body, in that order: UIkit.modal('#modal-center') .show(); script src="<?=urls()-> I just wanted to point out that both are above the closing /body. The <div id="modal-center" class="uk-flex-top" … is directly below the body tag. That was bad planning on my part. Of course I can only call a function when the script containing the function has been loaded before. I have now solved it this way: <script src="<?=urls()->templates?>assets/uikit/js/uikit.min.js"></script> <script src="<?=urls()->templates?>assets/uikit/js/uikit-icons.min.js"></script> <?php if ($page->id == 1 ): ?> <script> UIkit.modal('#modal-center') .show(); </script> <?php endif; ?> That works fine. I have defined a query for Home, because the window may only be called up one time when loading the website. It will be an information window with medical advice. It would be great if it were only displayed once, but that is probably not possible with the UIKit function. I didn't understand your explanation with ready.php, would the procedure make more sense? Or is document.ready callback different from the ready.php ?
×
×
  • Create New...