Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Munich, Germany

Recent Profile Visitors

1,358 profile views

aagd's Achievements

Jr. Member

Jr. Member (3/6)



  1. Post removed - Hasn't been a problem of the module...
  2. Can reproduce this here on 3.0.198 dev with Default Multilang Profile.
  3. The Problem was solved by https://github.com/processwire/processwire/commit/cde0f53ad60ac7a3bb62b42de5e151b7a6521caa
  4. You probably tried this already, just to be sure: Deleting the site/assets/cache folder. Checking that caching is off in that template's settings.
  5. It seems very unlikely to me that php can serve different code to different browsers. Did you check the output also in the page source (not inspector)? Does Firefox mark anything in red in page source (which should hint to html errors)?
  6. Like @bernhard said, a repeater works well for this. The output in the template could look like this: <ul> <?php foreach($page->repeater_faq as $faq):?> <li> <h2><?=$faq->question?></h2> <p><?=$faq->answer?></p> </li> <?php endforeach;?> </ul> If you want to optimize the FAQ page for Google SEO you could additionally add the content in JSON format (not visible on the page). More Info: https://developers.google.com/search/docs/advanced/structured-data/faqpage This is what I usually use: <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [ <?php $items = $page->repeater_faq; $item_count = count($items); foreach($items as $key => $value):?> { "@type": "Question", "name": <?=json_encode($value->question)?>, "acceptedAnswer": { "@type": "Answer", "text": <?=json_encode($value->answer)?> } }<?php if ($key === $item_count - 1){echo "\n";} else {echo ",\n";} ?> <?php endforeach;?> ] } </script>
  7. For larger sites I mostly use generic, numbered fieldnames like text_ml_01 (ml for multilanguage) which I might generate via API. Then in the templates I change the labels to something more meaningful and via AutoTemplateStubs I copy the complete field info with labels into the php templates, looks sth. like: /** * Template: basic-page (Basic) * * @property string $title Titel * @property string $text_ml_01 Headline * @property string $textarea_ml_01 Intro * @property string $body_01 Content * @property string $text_ml_02 CTA Button Label * @property mixed $url_ml_01 CTA Button URL * @property Pagefiles $files_ml_01 Linked Files */ For smaller sites I prefer more custom fieldnames.
  8. Next guess: a variable scope issue like in Make variables in _init.php available inside functions in _func.php - General Support - ProcessWire Support Forums
  9. My uneducated guess: Maybe a namespace issue? Are all your files in `namespace ProcessWire`?
  10. I used Ryans table field for a similar listing. It's a pro module (not free), but I liked the easier, faster entry of dates and the better overview. It's like a leaner version of a repeater field, good for hundreds of entries. https://processwire.com/store/pro-fields/table/
  11. In the RepeaterMatrix field create two repeater matrix item types: cta1 & cta2. They don't even have to have any fields, i guess. In the template file that should output the repeater items you can output them like this: <?php foreach($page->repeater_matrix_field as $item){ if ($item->type == "cta1"){ echo wireRenderFile("Call-to-Action01.php"); } if ($item->type == "cta2"){ echo wireRenderFile("Call-to-Action02.php"); } } ?> RepeaterMatrix is a pro module, though. Not Core.
  12. @fruid If your image URL is showing up normally in the meta tags, maybe the FB sharing cache got stuck. If FB has already cached the page, they might not parse it again anytime soon. But you could try resetting the cache at https://developers.facebook.com/tools/debug/sharing/batch/ . Enter your page URLs there and try again...
  13. @ClausWell, I can't guess where you would need the output of the SVG. If you need it just before the body content, it could look s.th. like this: $content = "<div class='svg-container'>" . file_get_contents($page->image->filename) . "</div>"; $content .= $page->body; Note the .= for appending to $content. If you want the SVG to appear somewhere in the middle of the body content I'd recommend looking into the Hanna Code module. If all you need is a single (or few) SVG in your page body, Hanna Code might also work without an extra SVG field, when you'd copy the SVG source directly in a tag (Haven't tested this). You could then place the tag within the body field like [[svg]]. The body field will the need to have the Hanna Code Text Formatter added as last element (in body Field Settings > Details > Text Formatters) to be able to output the tag.
  14. These are translatable strings. Means text in templates that is translateable via the Language module, but that's only editable in template code. Usually that's used for UI elements like buttons and other static texts. For editable content you need to create a (multi-language) field via Setup > Fields (or change existing text/textarea fields to their multilanguage versions).
  15. @Claus Instead of the image tag <img src="<?=$page->image->url?>" /> you would directly write the content of the svg file <svg>...</svg> <?=file_get_contents($page->image->filename)?> filename should give the full server path to the file. A relative path might also work. Note that ideally there should be no XML declaration in the SVG file. Also be aware that a 'bad' SVG can break your page or can do other evilous things. You shouldn't allow editors to upload SVG files, at least not without testing (or hide the field for non-superusers). Inlining allows to access SVG contents through external JS & CSS. From simple color changes on hover to animations (CSS & JS), there are a lot of useful benefits. There are also other ways that might work for you here like using <object> or <embed> tags. A good overview is Using SVG | CSS-Tricks - CSS-Tricks
  • Create New...