Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/16/2022 in Posts

  1. Awesome! Thank you, this is far easier for me to wrap my head around. ?
    2 points
  2. How about something like this? This way your editor can recognise the HTML tags as well as the PHP tags. The <?= ?> tag is a PHP shorthand for echo ... that you can insert within HTML. For PHP logic you need the full <?php ... ?> tag. You'll notice I've left a couple of echo statements in because they're short, and it's not really worth closing the PHP tag and opening another one for such short sections of HTML code. <div class="row mb-2"> <?php $items = $pages->find("homepage_item=1"); foreach($items as $item) { // $item === $pages->get($item->id); ?> <div class='col-md-6'> <div class='row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative'> <div class='col p-4 d-flex flex-column position-static'> <h3 class='mb-0'><?= $item->title?></h3> <?php if($item->arbitrary_publish_date) { echo "<div class='mb-1 text-muted'>$item->arbitrary_publish_date</div>"; } else { echo "<div class='mb-1 text-muted'></div>"; } ?> <p class='card-text mb-auto'><?= $item->summary ?></p> <a href='<?= $item->url ?>' class='stretched-link'>Continue reading</a> </div> <div class='col-auto d-none d-lg-block'> <svg class='bd-placeholder-img' width='200' height='250' xmlns='http://www.w3.org/2000/svg' role='img' aria-label='Placeholder: Thumbnail' preserveAspectRatio='xMidYMid slice' focusable='false'><title>Placeholder</title><rect width='100%' height='100%' fill='#55595c'/><text x='50%' y='50%' fill='#eceeef' dy='.3em'>Check it out!</text></svg> </div> </div> </div> <?php // echo $item->title; } ?> </div>
    2 points
  3. Natasha Marques is a desserts chef and chocolatier from Brazil with an international carreer. Now established in my hometown Porto, she's about to open a shop and already shipping her premium line of sweets and desserts. The website is my usual combo of PW with StencilJS frontend with a content blocks approach. Minimal stack of modules: SeoMaestro, WireMailSmtp, and my own block selector module which is a hacked version of FieldSelectFile. The site is only in portuguese, but have a look anyway: https://arbynatashamarques.com/
    1 point
  4. As Kholja mentioned: it works only if there is a Texarea Field that uses CKEditor. And ideed, it works… but this dependency is strange… but not technically
    1 point
  5. @horst could you please have a look at this issue? https://www.php.net/manual/en/function.get-magic-quotes-runtime.php Thx!
    1 point
  6. Hi @Jukka, I'm glad the module helps you build Apis for your frontend projects! Honestly, so far I'm not working on supporting caching solutions like ProCache. Not because I don't find it interesting or useful, but just because I don't have much experience with caching so far. Can you help me out with that? Maybe we can figure out together what the problem is or how the module would need to be extended to allow caching solutions to be docked without problems? Anyone else who is reading along here is of course also welcome to feel addressed :-) I am grateful for every advise!
    1 point
  7. @WillyC I did not know about html_entity_decode(), and in fact is solves my problem for now: <p> <?php $t = "We love to <span class='highlight'>highlight</span> so that it <span class='highlight'> stands out</span>."; $t = __($t); echo html_entity_decode($t, ENT_QUOTES, 'UTF-8'); ?></p> main.css .highlight { font-weight: 600; color: red; } The string will be output with the words 'highlight' and 'stands out' shown in bold red. Thanks a lot for this tip! At everyone: Soma mentioned that when using __("text"), everytime I change the text, the translations needed to be updated, too. I haven't started doing any translations, but I know that I often tweak text here and there, even if I intially thought it was 'final'. I certainly don't want the translaters have to redo their translation every time I do such a tweak. Is there a way to deal with edits to the main language text without effecting its translations? Cheers, Stefan
    1 point
×
×
  • Create New...