-
Posts
109 -
Joined
-
Last visited
-
Days Won
1
Nicolas last won the day on September 16 2013
Nicolas had the most liked content!
Contact Methods
-
Website URL
https://www.omnitic.com
Profile Information
-
Gender
Male
-
Location
Nantes, France
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Nicolas's Achievements
-
I've installed the new admin theme right after it has been release and was really please to see all the changes that have been made. ProcessWire is my CMS of choice since fourteen years and i must say that seing changes in the admin is quite refreshing and I want to thank @ryan @diogo and @jploch for their work. Many concerns and feedback have been raised since the release and I'm confident that they will be addressed/fixed for the final release. @MSP01 As stated by Ryan the original UIKit will still be available (though not as default). Regarding the color palette setting one that is pleasing to your eyes is as easy as tweaking some CSS variables in the admin.css file.
-
Thanks for this great module. I'd like to use it for an upcoming website but haven't totally wrapped my head around the instructions. Any chance you could provide a tutorial beyond the existing documentation ?
- 15 replies
-
- fieldtype
- inputfield
-
(and 2 more)
Tagged with:
-
Great website. Thank for sharing. It's always interesting to have some insights on what is going on behing the scene.
-
Great news about the site redesign. We all know how beautiful ProcessWire is at its core (great api, great extendability, and great developer experience overall). I hope that the redesign will set our beloved CMS on par with some of its competitors as long as marketing is concerned.
-
Thanks @Robin S, this hook did the trick 🙌
-
Is there a way to display/allow HTML tags in custom repeater label ? // CHange the label of the grape variety repeater $this->addHookAfter('InputfieldRepeater::renderRepeaterLabel', function(HookEvent $event) { $repeater = $event->object; if($repeater->name === 'grape_varieties') { $option_page = $event->arguments(2); $event->return = $option_page->title . '<span>(' . $option_page->color . ')</span>'; } }); Using the code above the span tag is escaped and not interpreted in the label.
-
You could use the Pages::saved hook to format a page's name. You can find a example of code here :
-
Hi, You may find a soltution to your problem here : Hope this helps.
-
You need to iterate over the menu items object. <?php $mainMenuItems = $mb->getMenuItems('Main navigation', 2, $options); foreach($mainMenuItems as $menu_item) { // You know have access to $menu_item->title // You know have access to $menu_item->url // See the doc for available $menu_item properties $has_children = ''; $has_children_dropdown = ''; $dropdown = ''; $tag_class = $menu_item->cssClass!=''?$menu_item->cssClass . ' ' . $has_children:$has_children; if($menu_item->isParent) { $has_children = 'has-submenu'; $has_children_dropdown = '<span uk-icon="chevron-down"></span>'; $children = $wire_pages->get($menu_item->pagesID)->children(); $dropdown = '<div uk-dropdown="animation: uk-animation-slide-top-small; duration: 300; animate-out: true; offset: 0; pos: bottom-left"><ul class="uk-nav uk-navbar-dropdown-nav">'; foreach($children as $child) { $dropdown .= '<li><a href="' . $child->url .'">'. $child->title . '</a></li>'; } $dropdown .= '</ul></div>'; } if($menu_item->pagesID == $current_page->parent->id || $menu_item->pagesID == $current_page->id) { $item = '<li class="current-item ' . $tag_class . '"><a href="' . $menu_item->url .'">'. $menu_item->title . $has_children_dropdown . '</a>' . $dropdown . '</li>'; } else { $item = '<li class="'. $tag_class .'"><a href="' . $menu_item->url .'">'. $menu_item->title . $has_children_dropdown . '</a>' . $dropdown . '</li>'; } if($menu_item->parentID == 0) { echo $item; } }
-
Add general information to specific template pages in admin
Nicolas replied to TomPich's topic in General Support
@virtualgadjo I might compare ProcessWire to the Perl language : "There is more than one way to do it" ©. Thanks to ProcessWire flexibility, it's good to have options depending on the way one is more comfortable with. -
Add general information to specific template pages in admin
Nicolas replied to TomPich's topic in General Support
Hi, Using ProcessWire notice system you could do something like <?php // In /site/ready.php $wire->addHookAfter('ProcessPageEdit::execute', function (HookEvent $event) { $pageEdit = $event->object; $page = $pageEdit->getPage(); if ($page->template == 'home') { $this->wire('notices')->add(new NoticeMessage("Hello World")); } }); -
My first ProcessWire website: peopleandplanet.org
Nicolas replied to artfulrobot's topic in Showcase
Great feedback. Regarding the second point of the things you don't like, ProcessWire provides core functions to manage the urls as you wish. Either with URL Hooks or with the templates' URL segments settings you can easily opt out the tree hierarchy structure of the pages. Thanks for your modules contributions. -
“Gentlemen you had my curiosity ... but now you have my attention.” ― Quentin Tarantino, Django Unchained
-
Get the pages tree retaining children position
Nicolas replied to Nicolas's topic in General Support
Hi @wbmnfktrThanks for your answer. I'm indeed using the TemplateEngineLatte module, but I think my issue is more related to the point mentionned by @BillH regarding the "sort=sort" parameter nested pages. I ended up adopting a recursive approach to solve my problem as shown below : <?php // In init.php $catalogue_root = $pages->get(1027); $view->categories = getOrderedCategories($catalogue_root->id); function getOrderedCategories($current_category_id, &$categories = []) { $current_categories = wire()->pages->get($current_category_id)->children('template=category'); foreach($current_categories as $category) { $categories[] = $category; // populate the reponse with category page object getOrderedCategories($category->id, $categories); // proceed with sub categories } return $categories; }