Jump to content

neophron

Members
  • Posts

    180
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by neophron

  1. I didn't touched the _main.php. Rockfrontend changed it: <?php namespace ProcessWire; /** @var RockFrontend $rockfrontend */ $rockfrontend->styles() ->add('/site/templates/uikit/dist/css/uikit.min.css') ->addDefaultFolders(); // autoload styles in sections, partials, etc $rockfrontend->scripts() ->add('/site/templates/uikit/dist/js/uikit.min.js'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <?= $rockfrontend->renderLayout($page) ?> </body> </html>
  2. Does it mean, that if someone, who just purchased this module and starts with a fresh PW installation, would face the same issues? I'm asking, cause I installed in fresh PW installation your 3 modules. Here' what happened: I installed the 3 modules and activated all example blocks. The home.php contains only <?= $rockpagebuilder->render(true) ?> In the frontend I was able to choose and fill a gallery, but there was no »save« button. So I had to create a gallery from the backend. The frontend showed me only the markup, cause there was no profile activated. I installed the Beginner Profile together with the latest uikit package. Since my php knowledge is more basic, what shall be inside the round brackets ->add(...)? The template/_init.php has this: // site/templates/_init.php if ($config->rockdevtools) { $devtools = rockdevtools(); // compile all less files to CSS $devtools->assets() ->less() ->add(...) ->save('/site/templates/src/.styles.css'); // merge and minify css files $devtools->assets() ->css() ->add(...) ->save('/site/templates/dst/styles.min.css'); // merge and minify JS files $devtools->assets() ->js() ->add(...) ->save('/site/templates/dst/scripts.min.js'); } The frontend shows me: Oops… Error: Exception: This feature has been removed with version 5 - please see upgrade guide at baumrock.com/rf-upgrade5 (in site/modules/RockFrontend/RockFrontend.module.php line 2794) #0 site/templates/_main.php (6): RockFrontend->styles() #1 wire/core/TemplateFile.php (340): require('/www/htdocs/w01...') #2 wire/core/Wire.php (413): TemplateFile->___render() #3 wire/core/WireHooks.php (968): Wire->_callMethod('___render', Array) #4 wire/core/Wire.php (484): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #5 wire/modules/PageRender.module (581): Wire->__call('render', Array) #6 wire/core/Wire.php (416): PageRender->___renderPage(Object(HookEvent)) #7 wire/core/WireHooks.php (968): Wire->_callMethod('___renderPage', Array) #8 wire/core/Wire.php (484): WireHooks->runHooks(Object(PageRender), 'renderPage', Array) #9 wire/core/WireHooks.php (1094): Wire->__call('renderPage', Array) #10 wire/core/Wire.php (484): WireHooks->runHooks(Object(Page), 'render', Array) #11 wire/modules/Process/ProcessPageView.module (193): Wire->__call('render', Array) #12 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(Page), Object(PagesRequest)) #13 wire/core/Wire.php (416): ProcessPageView->___execute(true) #14 wire/core/WireHooks.php (968): Wire->_callMethod('___execute', Array) #15 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array) #16 index.php (55): Wire->__call('execute', Array) #17 {main} This error message was shown because: you are logged in as a Superuser. Error has been logged. So, I'm installing the latest versions of these modules. After the setup an error appears with a notice, that I have to read the explanations on line 2794 how to change the _init.php. Or shall I install also the new rockdevtools module? I'm not an expert in module coding at all, but this solution is not very user friendly.
  3. Hi Bernhard, this is the _init.php: <?php namespace ProcessWire; /** @var RockFrontend $rockfrontend */ $htmlLang = "de"; $rockfrontend->styles() ->add('/site/templates/uikit/src/less/uikit.theme.less') ->add('/site/modules/RockFrontend/less/defaults.less') ->addDefaultFolders() ->minify(!$config->debug); $rockfrontend->scripts() ->add('/site/templates/uikit/dist/js/uikit.min.js') ->add('/site/templates/scripts/main.js', 'defer') ->minify(!$config->debug); $seo = $rockfrontend->seo(createManifest: false) ->title($page->title . " | example.com");
  4. Hi, I'm desperately trying to install RPB. PW 3.0.244 (), RPB 6.2.0 with php 8.2. I followed all instructions (https://www.baumrock.com/en/processwire/modules/rockpagebuilder/docs/setup/). This is the frontend: What the… Error: Exception: Method RockFrontend::styles does not exist or is not callable in this context (in wire/core/Wire.php line 563) #0 wire/core/Wire.php (419): Wire->___callUnknown('styles', Array) #1 wire/core/WireHooks.php (968): Wire->_callMethod('___callUnknown', Array) #2 wire/core/Wire.php (484): WireHooks->runHooks(Object(RockFrontend), 'callUnknown', Array) #3 wire/core/Wire.php (487): Wire->__call('callUnknown', Array) #4 site/templates/_init.php (9): Wire->__call('styles', Array) #5 wire/core/TemplateFile.php (314): require('/Users/neophron...') #6 wire/core/Wire.php (413): TemplateFile->___render() #7 wire/core/WireHooks.php (968): Wire->_callMethod('___render', Array) #8 wire/core/Wire.php (484): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #9 wire/modules/PageRender.module (581): Wire->__call('render', Array) #10 wire/core/Wire.php (416): PageRender->___renderPage(Object(HookEvent)) #11 wire/core/WireHooks.php (968): Wire->_callMethod('___renderPage', Array) #12 wire/core/Wire.php (484): WireHooks->runHooks(Object(PageRender), 'renderPage', Array) #13 wire/core/WireHooks.php (1094): Wire->__call('renderPage', Array) #14 wire/core/Wire.php (484): WireHooks->runHooks(Object(HomePage), 'render', Array) #15 wire/modules/Process/ProcessPageView.module (193): Wire->__call('render', Array) #16 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(HomePage), Object(PagesRequest)) #17 wire/core/Wire.php (416): ProcessPageView->___execute(true) #18 wire/core/WireHooks.php (968): Wire->_callMethod('___execute', Array) #19 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array) #20 index.php (55): Wire->__call('execute', Array) #21 {main} This error message was shown because: you are logged in as a Superuser. Error has been logged. I'm installing the Rockfrontend and Rockmigrations modules by »Add Module from directory«. Since the RPB zip file is too big for the »Add Module from upload«, I'm uploading it to the modules directory. Everything works fine in the backend. I'm afraid, that I missed something, cause meanwhile there are differences in the installation video and the latest version. Like the field »rockpagebuilder_blocks« is already attached to the home.php.
  5. More then one Sender Email Addresses with FormBuilder Hi there, first a big Danke for this module! In a website I have two forms, both built with FormBuilder. They shall have a different Sender Email Address. The Wire Mail SMTP overrides the sender email addresses in the FormBuilder forms. Right now, both forms sends the emails with the same sender address. Where can I add the additional sender email address?
  6. Hyvää huomenta, first – thank you for this module. It was on my watch list since last year. Now I wanted to use this module in a bigger project, and I have some questions: 1. Is there a way to in- or exclude templates? Like 'template=simple_page|contact_page' or 'template!=my_template' 2. How can I add a css style from a field (let's say a simple textfield like {css_field}) to a <li> or <a>? Thanks
  7. Hi guys, in a website with a lot of fieldsetpages I want to show in this case accordions, only if a field (body) is populated. This is my faulty code: <?php if ($page->sectionfield_fa_membership->body) : ?> <section class="membership"> <ul uk-accordion> <li itemscope itemprop="mainEntity" itemtype="https://schema.org/Question"> <a class="uk-accordion-title" href> <p itemprop="name">Membership</p> </a> <div class="uk-accordion-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer"> <div itemprop="text"><?= $page->sectionfield_fa_membership->body; ?></div> </div> </li> </ul> </section> <?php endif ?> I'm getting this error: Attempt to read property "body" on null The logic is based on this code: <?php if ($page->body) { echo $page->body; } ?>
  8. Thanks for this cool explanation! I converted an existing website to a multilanguage site with DE and EN. After finishing all steps, I noticed, that in all fields the english tab was the active one. But it had to be the opposite way. So I deactivated / uninstalled the Core -> Language -> Languages Support - Tabs module. Logged out and in and reinstalled the Languages Support - Tabs module. And voilà, now all DE tabs are the active ones.
  9. Good day everyone, I'm wondering if this cool module could help me with the following structure, where all »sub-home« pages have the same template: home (mother page) —> navigation that shows only all child pages from the mother page - about - contact - news - sub-home A (template subhome) —> navigation that shows only all child pages from A -- about A -- contact A -- news A - sub-home B (template subhome) —> navigation that shows only all child pages from B -- about B -- contact B -- news B - sub-home C (template subhome) —> navigation that shows only all child pages from C -- about C -- contact C -- news C I'm using the markup regions templating. Most child pages use the same templates.
  10. Before I switched to PW, I worked with a german CMS (Contao). It stores all media in the classical way in an upload folder. I'm still managing such Contao websites, some of them are meanwhile about 10 years old. e.g. among them is a Contao website with a lot of PDFs, that are updating every 3 or 4 months. I'm trying to organize them in subfolders, but meanwhile it's getting messy. And this is where PW is really useful. Looking back on my website projects, I must say, that the PW file-concept was for most clients a better solution. Some of them worked before with Contao and they appreciated the upload fields in the PW backend. If there is a need for reusing the same image on different places, PW offers some solutions. Recently I purchased this: https://mediamanager.kongondo.com HAPPY NEW YEAR!
  11. Recently I transferred a website from WP to PW. First I had to clone the WP site in order to install it on a different hosting company. It turned out, that this WP installation (about 6 main pages and 20 subpages) with a few images, had the size of about 1 GB! This video helped me: https://www.youtube.com/watch?v=tIurrwfsCOg&list=LL&index=32&t=474s I found in the upload directory a lot of 7000px wide jpgs. Every time an image is uploaded, WP generates about 4 or 5 different size variations and keeps them all in the same directory. There were plugins installed, that all begged for an upgrade. Everywhere in the backend constantly informations from different sources popped up. After I finished the new website in PW, I compared the amount of the generated html code. The PW code was about 80% smaller.
  12. Now for everybody, who looks how to include files from a subdirectory: In site/templates/includes/menu_main.php render the file by: <?php echo wireRenderFile('includes/menu_main.php'); ?>
  13. Thanks for this hint. PW offers really a lot modifications. This is part of the html backend structure, seen from a non admin: <div class="PageListItem PageListTemplate_video PageListNoChildren PageListID1226 PageListStatusUnpublished secondary PageListStatusHidden PageListItemHover" data-numtotal="0" data-numchild="0"> <a href="#" title="/video-container/video-03/" class="PageListPage label"> <i class="icon fa fa-fw fa-video-camera"></i> Video 03 | video </a> ... </div> It would be cool, if {template.name} could be wrapped in a display: not span, that is loaded only if a user is logged in.
  14. Thanks a lot @BitPoet Nr 3 works fine ?
  15. I wanted to refresh this, cause meanwhile the new name of module is »Page List«. Modules --> Core --> Page List --> {title} | {template.name} But recently I noticed, that adding an icon to a template removes the template name. And now I have two questions: Is there a way to show both? Is there a way to hide the template names for non admins?
  16. Trying to get property 'media_manager_v_single' of non-object
  17. 10 years later! Searching for a getRandom() solution from a repeater, I stumbled upon this thread. I have the repeater_headline_movie_text with the field media_manager_v_single. My goal is to render only one repeater item randomly. This is my bad code: <? foreach ($page->repeater_headline_movie_text->getRandom() as $item) : ?> <article class="video_article"> <h3><?= $item->headline; ?></h3> <?php $out = $item->media_manager_v_single->each(function ($resource) { return "<video src='{$resource->media->url}' poster='{$resource->media->poster}' width='720' height='408' controls></video>"; }); echo $out; ?> <div class="textwrapper"> <?= $item->body_second; ?> </div> </article> <? endforeach; ?>
  18. Hi Adrian, thanks for your suggestion. Yes, now I see what's missing. The logic must be: Select the page, check if there is a field video_field inside and render the content. And I think that this php-logic causes me headache ?
  19. Struggling with page reference inside repeater Hi, since the video files are usually bigger then some jpgs, I wanted to reuse uploaded video files on a website. There is a page reference field select_video inside a repeater. The file field for the videos is video_field. In a hidden page "video-container" are hidden child pages. Each child pages has a single video. I want to show each video via the page reference (inside a repeater) on a different page. In the field video_field under Basics -> Type the option Files is active. This is my code, where only headline and body_second are rendered. <? foreach ($page->repeater_headline_movie_text as $item) : ?> <h3><?= $item->headline; ?></h3> <article class="video_article"> <?php if ($item->select_video->id) : ?> <?php $file = $item->video_field; if($file) { echo "<video width='{1280}' height='{710}' poster='{$file->video_field->poster}' controls='controls' preload='yes'> <source type='video/mp4' src='{$file->video_field->url}' /> <track kind='subtitles' src='{subtitles}' srclang='de' /> </video> "; } ?> <?php endif; ?> <div class="textwrapper"> <?= $item->body_second; ?> </div> </article> <? endforeach; ?>
  20. Hi, maybe some of you already know this project: https://utopia.fyi They offer a type-, space- and grid-calculator for fluid design, no breakpoints. All these are actually clamp-clalculators.
  21. Using wireRenderFile doesn't render the stuff. Using wireIncludeFile works right now. No idea what's wrong cause there are no errors (even with tracy).
  22. Thanks. I think I found the error: It's the famous <?php namespace ProcessWire; Solution: all included php files should start with a <?php namespace ProcessWire; And in my case now it looks like this: <?= wireIncludeFile('includes/menu_main.php'); ?>
  23. Hi guys, I'm struggling with including php files from a subfolder. Maybe because there are more then one solution. I'm using the $config->useMarkupRegions = true; with the _main.php. Right now I have some php files that I include in the template files like this: <?php include('menu_main.php'); ?> Now I have this subfolder: /templates/includes This won't work: <?php include('includes/menu_main.php'); ?> Using <?php wireIncludeFile('includes/menu_main.php'); ?> works only with the menu_main.php file, but not with others. What would you suggest?
×
×
  • Create New...