Jump to content

MateThemes

Members
  • Posts

    91
  • Joined

  • Last visited

1 Follower

Contact Methods

  • Website URL
    https://mate-themes.com

Profile Information

  • Location
    Austria

Recent Profile Visitors

2,271 profile views

MateThemes's Achievements

Full Member

Full Member (4/6)

32

Reputation

  1. thank you for your fast reply. You are right. I forgot that the styles/_custom.less is referenced in the main less file. I removed it and it works fine. Thank you!
  2. Hello everyone, i currently start to use RockFrontend and I start with the starter profile. the problem I discover is, when I remove in _init.php the less file loaded from the uikit folder, it gives me a 500 error. As I don't want to use the less file coz I have a custom uikit file in css, how can I achieve this? <?php namespace ProcessWire; // Optional initialization file, called before rendering any template file. // This is defined by $config->prependTemplateFile in /site/config.php. // Use this to define shared variables, functions, classes, includes, etc. $rf = rockfrontend(); $rf->styles() // add the base uikit theme ->add('/site/templates/uikit/src/less/uikit.theme.less') // add default folders like /sections and /partials ->addDefaultFolders() // add the bundled tailwind utility classes ->add('/site/templates/bundle/tailwind.css') // minify on production ->minify($config->debug ? false : true); $rf->scripts() // load uikit (without defer to avoid FOUC) ->add('/site/templates/uikit/dist/js/uikit.min.js') // load uikit (with defer to avoid FOUC) ->add('/site/templates/uikit/dist/js/uikit-icons.min.js', 'defer') // load custom javascript of this project ->add('/site/templates/scripts/main.js', 'defer') // minify on production ->minify($config->debug ? false : true); For clarification I want to remove uikit.theme.less and replace it with this file: <?php namespace ProcessWire; // Optional initialization file, called before rendering any template file. // This is defined by $config->prependTemplateFile in /site/config.php. // Use this to define shared variables, functions, classes, includes, etc. $rf = rockfrontend(); $rf->styles() // add the base uikit theme ->add('/site/templates/bundle/styles.css') // add default folders like /sections and /partials ->addDefaultFolders() // add the bundled tailwind utility classes ->add('/site/templates/bundle/tailwind.css') // minify on production ->minify($config->debug ? false : true); $rf->scripts() // load uikit (without defer to avoid FOUC) ->add('/site/templates/uikit/dist/js/uikit.min.js') // load uikit (with defer to avoid FOUC) ->add('/site/templates/uikit/dist/js/uikit-icons.min.js', 'defer') // load custom javascript of this project ->add('/site/templates/scripts/main.js', 'defer') // minify on production ->minify($config->debug ? false : true); Thank you
  3. Really great work! Thanks for the technical lesson. I am still learning ProcessWire and this helps me a lot!
  4. Hello, i know this is an old forum topic. But may it is possible that you write a short tutorial how you setup a deploy process?! Thank you
  5. Hy Bernhard,

    Thanks for your great RockFrontend module. I have a question what is the best practice to make an existing site to RockFrontend?

    Thanks in advance for your input!

    1. bernhard

      bernhard

      Hi @MateThemes could you please open a Thread in the RockFrontend forum? https://processwire.com/talk/forum/65-rockfrontend/

  6. Hello everyone, I have following markup for my menu build with module "MenuBuilder" and I want to update it to PHP 8. I am not very expirienced with PHP so I cant find a solution. Here is the code: <?php namespace ProcessWire; /* * * Main Menu. * */ ?> <?php /** * Builds a nested list (menu items) of a single menu. * * A recursive function to display nested list of menu items. * * @access private * @param Int $parent ID of menu item. * @param Array $menu Object of menu items to display. * @param Int $first Helper variable to designate first menu item. * @return string $out. * */ function buildMenuFromObject($parent = 0, $menu, $first = 0) { if(!is_object($menu)) return; $out = ''; $has_child = false; foreach ($menu as $m) { $newtab = $m->newtab ? " target='_blank'" : ''; // if this menu item is a parent; create the sub-items/child-menu-items if ($m->parentID == $parent) {// if this menu item is a parent; create the inner-items/child-menu-items // if this is the first child if ($has_child === false) { $has_child = true;// This is a parent if ($first == 0){ $out .= "\n<ul class='uk-navbar-nav'>"; $first = 1; } else { $out .= "\n\t<div class='uk-navbar-dropdown'>" . "\n\t\t<ul class='uk-nav uk-navbar-dropdown-nav'>"; } } // active/current menu item $class = $m->isCurrent ? ' class="uk-active"' : ''; // a menu item $out .= "\n\t<li$class><a href='{$m->url}{$newtab}'>{$m->title}</a>"; // call function again to generate nested list for sub-menu items belonging to this menu item. $out .= buildMenuFromObject($m->id, $menu, $first); if ($m->isParent) $out .= "\n\t</div>\n";// close div.uk-navbar-dropdown $out .= "</li>"; }// end if parent }// end foreach if ($has_child === true) $out .= "\n</ul>"; return $out; } // example usage $mb = $modules->get('MarkupMenuBuilder'); $menuItemsAsObject = $mb->getMenuItems(1073, 2); $menu = buildMenuFromObject(0, $menuItemsAsObject); echo $menu; ?> As far as I found out, the problem is the function with the $menu variable. But I can't find a way to update this. May someone can help me out! thanks in advance
  7. Thank you for your reply and a code example. You are right menu isn't changed. But how you manage if the customer wants complete freedom over navigation? Thank you for your reply. Do you have a code example? Especially how you manage mega menu with an image in the menu?
  8. Hello everyone, this is a general support topic. The last time I often had website templates with mega menu including images. So there this is always an advanced topic for me. I normally used ProcessMenuBuilder but this is not suitable for me anymore. So I want to asked the community, how do you build your menus? With module or whatever. Thanks in advance.
  9. Amazing work! I really like the design!
  10. Thank you very much for your help. Everything now works like a charm.
  11. Thank you for your help @zoeck The only thing is that then the Home link is with uk-nav-header markup. Any ideas to render a normal nav item?
  12. Hello everyone. I need your help. I use in my template following code to render my uikit offcanvas. <div class="uk-offcanvas-bar uk-box-shadow-large"> <button class="uk-offcanvas-close" type="button" data-uk-close></button> <?php // example of caching generated markup (for 600 seconds/10 minutes) echo cache()->get('offcanvas-nav', 10, function() { return ukNav(pages('/')->children(), [ 'depth' => 2, 'accordion' => false, 'type' => 'default', 'class' => '', // 'blockParents' => [ 'blog' ], 'repeatParent' => true, 'noNavQty' => 20, 'maxItems' => 16, 'divider' => false, ]); }); ?> </div> In this code is the root page (home page) not render. I didn't find a solution to render the root page. May someone can help me! Thanks in advance.
  13. I removed the module from the folder and installed it with uploading RockMigrations in site/modules now the error message is gone. It seems to happen with the zip upload.
  14. Hy @bernhard You are right. I just downloaded the RockFrontend and RockMigrations and installed it via the backend as zip upload. I need to say, I just don't know why this happened?! Is it better to move the module inside the side modules folder and add the module from there? Thank you.
  15. Hello! First to say, thanks for your great work. I have a mulitlanguage site setup and if I log out as user I have following error message: I can't find a solution for that. Thanks for your help!
×
×
  • Create New...