Jump to content

neophron

Members
  • Posts

    149
  • Joined

  • Last visited

  • Days Won

    1

neophron last won the day on August 29 2018

neophron had the most liked content!

1 Follower

Contact Methods

  • Website URL
    http://designport.info

Profile Information

  • Gender
    Male
  • Location
    Berlin

Recent Profile Visitors

2,288 profile views

neophron's Achievements

Sr. Member

Sr. Member (5/6)

80

Reputation

  1. You're absolutely right. I wrote my question too hasty. I'm gonna find a different way for applying a color to a teaser.
  2. Hi there, meanwhile the client had a new wish and I need your help again. An archive page shall contain children, which will be moved there manually. Structure:archive (archive) --> shows teaser from child pages child-page 02 child-page 01 child-page 03 child-page 01 child-page 01 child-page 02 The classical way to echo child pages is by: <?php foreach ($page->children() as $teaser) : ?> But I need again the data from the color_field mentioned above <?= $teaser->parent->select_color->title; ?> The logic now would be something like this: Find all children from parent=1223|1224|1225 and echo a teaser only if they are children from archive
  3. Hi guys, 5 years later… for separating the date components from a date field, I found this solution. This works fine. <?php $d = strtotime($page->datefield); echo date('d', $d) . '<br>'; //e.g 8 echo date('F Y', $d); //e.g. November 2015 ?> But I want to germanize the output. I tried this: <?php setlocale(LC_ALL, 'de_DE.UTF-8'); $d = strftime("%d. %B %G", strtotime($veranstaltung->datefield)); echo date('%d.', $d) . '<br>'; echo date('%B', $d); ?> But I'm getting an error: A non well formed numeric value encountered In my config.php I have these lines: $config->timezone = 'Europe/Berlin'; setlocale(LC_ALL, 'de_DE.UTF-8'); I don't know, if these settings from the date field are correct
  4. Thanks! Now it works fine 🙂 I'm going to have a look at this »Latte«
  5. Thanks, but now I'm getting this error from this line: Trying to get property 'children' of non-object
  6. I'm still getting an error. I this think, that this line causes trouble <?php foreach ($pages->findIDs('1223|1224|1225, sort=-created')->children as $item) : ?>
  7. Thanks for the hint. I created this, but it gives throws me an error: <?php foreach ($pages->findIDs('1223|1224|1225, sort=-created')->children as $item) : ?> <?php if ($item->matches('parent=1223')) : ?> <a href='<?= $item->url; ?>' class='teaser-angebot-wrapper <?= $item->select_color->title; ?>'> <section> <h3><?= $item->title; ?></h3> <p>Ausstattung: <?= $item->textfield_01; ?></p> </section> </a> <?php elseif ($item->matches('parent=1224')) : ?> <a href='<?= $item->url; ?>' class='teaser-angebot-wrapper <?= $item->select_color->title; ?>'> <section> <h3><?= $item->title; ?></h3> <p>Wo / Wann: <?= $item->textfield_02; ?></p> </section> </a> <?php endif ?> <?php endforeach ?>
  8. Hi guys, I'm struggling with the following situation: Structure: parent_page 01 (template01) --> shows teaser from child pages child-page 01 child-page 01 child-page 01 parent_page 02 (template01) --> shows teaser from child pages child-page 02 child-page 02 child-page 02 parent_page 03 (template02) --> shows teaser from child pages child-page 03 child-page 03 child-page 03 collect_page (template_collect) --> //This page shows teasers from all child pages In the template01 and 02 is a select options field (select_color) for 3 colors. The child pages gets the parent color by: $page->parent->select_color->title; Now I need the parent colors for all teasers on the collect_page. Something like: <?php foreach ($pages->findIDs('1223|1224|1225, sort=-created')->children as $item) : ?> <?php if item is child page from parent with ID=1223 -> select_color->title : ?> <?php elseif item is child page from parent with ID=1224 -> select_color->title : ?> <?php elseif item is child page from parent with ID=1225 -> select_color->title : ?>
  9. There is a long comment (in german) from a guy, he's complaining about PW. Part of the stuff, he's talking about, is beyond my knowledge (MySQL, queries). He mentions, that he must work with PW, maybe that's why he is unhappy. https://www.heise.de/forum/heise-online/Kommentare/WordPress-Alternative-Websites-flexibel-gestalten-und-verwalten-mit-ProcessWire/Bitte-nicht/thread-7053784/#posting_40820682
  10. Thanks for this comparison, a lot useful informations. I remember how many years ago (around 2013–14) I was looking for a new CMS and for some time I played with Craft. Later I found also Bolt CMS (also with TWIG support) and Kirby interesting.
  11. Hi, today I had to move a PW installation (3.0.193) to a client hosting company with Plesk. For some reason an image with multi-file array of items (Pageimages) won't be rendered. The front end will be empty, no error messages at all. The single-file (Pageimage) works, but only as long as I'm logged in. I'm using the matrix repeater with the ISOLATING ITEM OUTPUT TO SEPARATE VIEW FILES method. I have to admit, that during writing this, it came to my mind, that the Matrix Repeater could be the problem. So, I'm going to ask Ryan .
  12. Hi Chris, thanks for the help. Meanwhile the website I needed it for, is »on stage« with a solution from @elabx. But I'm going to check your code in a cloned version of the website. You're right! greetings, Nikolai
  13. Hi guys, I need some help with this gallery: <?php $options = array('cropping' => true, 'upscaling' => false, 'quality' => 80); // cropping => true is default and same like 'center' foreach ($item_gallery->gallery as $img) { if ($img->width > $img->height) { // check for orientation $slide = $img->size(2400, 0); // we have a landscape oriented image } else { $slide = $img->height(1800); // we have a portrait oriented image } // output your markup here echo " <figure> <a class='uk-inline' href='{$slide->url}' data-caption='{$slide->description}'> <img class='photo' data-src='{$slide->size(760, 0,$options)->url}' alt='{$slide->description}' uk-img> </a> <figcaption class='uk-hidden@s'> <p>{$slide->description}</p> </figcaption> </figure> "; } ?> The goal is to show in a uikit lightbox images that are max. 1200px wide and the max height is 900px. The client will upload images that are 2x bigger, to have resources for the retina output. How should I define the srcset and the sizes if you have all these different proportions and orientations? I saw that in sizes I can use this: (orientation: portrait) Thanks in advance.
  14. Thanks for the link, I had this link buried somewhere in my bookmarks. Sadly most of the nav examples are equal to the UIkit accordion, where a parent page is only a trigger. The big screen navigation has the usual dropdown (ul.level_2) You mean adding a redirection link to the parent page, based on a template that can be hidden via: 'selector' => 'template!=basic-page-hidden', home parent-page 01 parent-page 01 (redirect) child-page child-page child-page parent-page 02 parent-page 02 (redirect) child-page child-page child-page about contact
  15. Hi guys, for a website, the client wishes a mobile menu with an accordion nav. Since I'm using UIkit in the frontend, I implemented this https://getuikit.com/docs/nav with Somas MarkupSimpleNavigation module. The problem is, that the accordion nav solution from UIkit converts all parent pages into accordion triggers. You can't access these pages by clicking on it. I've seen other solutions, where only the arrow or plus icon is the trigger and the name is the link. This is my code: <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'parent_class' => 'parent', 'current_class' => 'current', 'has_children_class' => 'has_children uk-parent', 'levels' => true, 'levels_prefix' => 'level-', 'max_levels' => 3, 'firstlast' => false, 'collapsed' => false, 'show_root' => true, 'selector' => 'template!=basic-page-hidden', 'selector_field' => 'nav_selector', 'outer_tpl' => '<ul class="level_1 uk-nav-primary uk-nav-parent-icon" uk-nav>||</ul>', 'inner_tpl' => '<ul class="level_2 uk-nav-sub">||</ul>', 'list_tpl' => '<li%s>||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}">{title}</a>', 'item_current_tpl' => '<a href="{url}">{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<a href="{url}">{title}</a>', 'xitem_current_tpl' => '<span>{title}</span>', 'date_format' => 'Y/m/d', 'code_formatting' => false, 'debug' => false ); echo $treeMenu->render($options); ?> This the result, where the parent pages are triggers. So, I'm looking for a solution, where the only the arrows are triggers.
×
×
  • Create New...