-
Posts
55 -
Joined
-
Last visited
Profile Information
-
Gender
Male
-
Location
Cologne, Germany
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
sebibu's Achievements
Full Member (4/6)
23
Reputation
-
Thanks @bernhard!👍 Commenting out this line... class Text extends Block { const prefix = "rpb_text_"; public function info() { return [ 'title' => 'Text', //'spaceV' => self::spaceM, ← HERE ... did the trick.☺️ 👍
-
I'm just wondering how to hide the frontend editing block-buttons vspacetop and vspacebottom!? On one website they are already disabled but I don't now how I achieved this.😇 For a quick'n'dirty CSS-hack there is no id or class given. Thx for a quick hint!👋
-
Thanks for your help! Trying.. {var $map = wire('modules')->get('MarkupLeafletMap')} {$map->render($page, 'map')} ..in RockPageBuilder block LATTE-file I get: Call to undefined function wire() in block Trying.. {var $map = $this->$wire('modules')->get('MarkupLeafletMap')} {$map->render($page, 'map')} .. I get: Method name must be a string in block Now I'm confused. 😆 What I'm doing wrong?
-
Thx @wbmnfktr for taking on ProcessWire Recipes and the time for caring and asking this questions! To be honest.. Yes, I would expect (and maybe even demand😇) that ProcessWire related projects like this are built with ProcessWire itself. Especially for sites with structured and tagged content like on ProcessWire Recipes, PW is predestined, I think.😉🙋♂️
-
I really love LATTE (Template Engine by Nette) but here and there I still have problems with the syntax. I'm using RockPageBuilder by @bernhard and try to output the html for this module: https://processwire.com/modules/fieldtype-leaflet-map-marker/ In PHP this would be: <?php echo $map->render($page, 'YOUR MARKER FIELD'); ?> And in LATTE? 😆 I tried this variants and more: {$map->render($page, 'map')} {$map->render($page, 'block->map')} {$map->render($page, $block->map)} Getting: Call to a member function render() on null in block #1158 (rockpagebuilderblock-map) Maybe this topic can be a collection point for smaller Latte syntax questions.
-
Thank you @bernhard for helping optimizing the code!👍 For checking the template field I already used a guard clause, but for the template check it makes sense and is more readable to use it, too. I would like to keep the german special characters like äöüß instead of exchanging (->pageNameTranslate) them with ae, oe, ue, ss. So wire('sanitizer')->pageNameUTF8($title); should be the way to go. Right?
-
Hey Procis, wrote this - and my very first - hook „Prepend date in page name“, yesterday. Once you get it, this system and the API is magnificent. Thank you @ryan and @all contributers! On new (news) pages it works great so far. E.g.: Title: Testnews mit Ümläüten Altered page name: 2024-09-24-testnews-mit-ümläüten But on existing pages special characters are removed. E.g. Title: Partnerschaftliche Unterstützung - Ihr werdet gesucht! Altered page name: 2023-07-27-fans1991-partnerschaftliche-untersttzung-ihr-werdet-gesucht Another example is attached. There you can see, that the ProcessPageEdit-message shows the right path!? I have this in my site/config.php to allow only german special characters: $config->pageNameCharset = 'UTF8'; $config->pageNameWhitelist = '-_abcdefghijklmnopqrstuvwxyz0123456789äöüß'; Temporary uninstalled Module „PagePathHistory“ with no look. The code of my hook (suggestions for improvement are very welcome!): /* NEWS pages only: prepend date in page-name */ $wire->addHookAfter('Pages::saveReady', function($event) { // get current Page object — in this case this is the first argument for the $event object $page = $event->arguments(0); // Only for pages with news template if($page->template == 'news') { // Test if field day exists, otherwise exit if (!$page->template->hasField('day')) { $event->message("Field 'day' is missing!"); return; } $title = $page->get('title'); // Sanitize title and substitute special characters $optimizedTitle = wire('sanitizer')->pageNameUTF8($title); //$optimizedTitle = wire('sanitizer')->pageName($title, Sanitizer::okUTF8); // or translate option $date = wireDate('Y-m-d', $page->day); // Set output formatting state off, for page manipulation $page->of(false); $page->name = $date.'-'.$optimizedTitle; //$page->save('name'); $event->message("New saved name is $page->name"); //$event->message("Path of new saved page is $page->path"); } }); Any idea why this doesn't works on all existing news, too? Thx and 👋 Sebastian
-
Thanks @bernhard for helping me out yesterday! Will try to include jQuery only on the necessary pages with a different implementation in the new week.
-
@bernhard Do you have any ideas on this? Thx & greetings!?
-
Any idea why editing blocks does not open up in a modal anymore for editors and superusers on both websites I'm using RPB? Seems like for the first milliseconds it opens a modal but then follows a normal pagerequest to the RockPageBuilderBlocks-site. I browsed my configuration, the docs the last days and editors do have the permission `page-edit-front`. I'm without further ideas..?
-
I agree with that. Thanks @Stefanowitschfor the first impressions. Looks great. I am looking forward to your whole showcase! Thanks also for showing the block-actions-setting-syntax! That would have been the next thing i would have asked, I didn't find that in the docs. Did I missed it or otherwise could you please add it, @bernhard? A search function on your site for the docs would be convenient and probably saves you a few questions.
-
Thanks for the in-depth knowledge to this, @bernhard! I used this before but tried to avoid it for security reasons. The background is.. At one time the block-actions were not visible, so I suspected it could be the noescape-filter. Yesterday I realized by chance, that block-actions are not visible when using the „hide topbar“-button in the RockFrontend Topbar. I don't find that logical. Can you please separate this two functions in two topbar-buttons?
-
Thanks for the valuable clarification, @bernhard! I'm still a newbie to PW and the API. One last question for today?: What could be the reason the RPB-content is outputted like this?? <section id="b1672" class="rpb-text" data-rpbblock=1672 alfred='{"icons":[{"icon":"edit","tooltip":"Edit Block #1672","href":"\/rs\/page\/edit\/?id=1672&language=1062","class":"pw-modal alfred-edit","suffix":"data-buttons=\"button.ui-button[type=submit]\" data-autoclose data-reload"},{"icon":"up","label":"","tooltip":"vSpace top default","type":"vspacetop","widget":1672},{"icon":"down","label":"","tooltip":"vSpace bottom default","type":"vspacebottom","widget":1672},{"icon":"clone","label":"","tooltip":"Clone Block #1672","href":"\/rs\/rockpagebuilder\/clone …
-
Okay, I had a board in front of my head.? <div class="uk-child-width-1-2@s" uk-grid> <div>{$block->rpb_left->render()}</div> <div>{$block->rpb_right->render()}</div> </div>