-
Posts
485 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Gideon So
-
Hi @milo695, <?php foreach ($homepage->children as $item): ?> <li class="nav-item"> <a class="nav-link" href="<?php echo $item->url; ?>"<?php if ($item->id == $page->rootParent->id): ?> class="active"<?php endif; ?> title="<?php echo $item->title; ?>"> <?php echo $item->title; ?> </a> </li> <?php endforeach; ?> This piece of code only loop through the children page of the home page. Therefore only first level menu items are shown. You need to loop through the sub page of each $item to show all the subitems. <?php foreach ($homepage->children as $item): ?> <li class="nav-item"> <a class="nav-link" href="<?php echo $item->url; ?>"<?php if ($item->id == $page->rootParent->id): ?> class="active"<?php endif; ?> title="<?php echo $item->title; ?>"> <?php echo $item->title; ?> </a> <?php if($item->children->count()): // if there is a child page, loop through all the child page ?> <ul> <?php foreach($item->children as $subitem): //loop through all the sub-page of the current $item ?> <li class="nav-item"> <a class="nav-link" href="<?php echo $subitem->url; ?>"<?php if ($subitem->id == $page->rootParent->id): ?> class="active"<?php endif; ?> title="<?php echo $subitem->title; ?>"> <?php echo $subitem->title; ?> </a> </li> <?php endforeach; ?> </ul> <?php endif; ?> </li> <?php endforeach; ?> You can modify it to suit your theme to make the dropdown work, Gideon
-
Hi @Jan Romero, Thanks for your reply. It works. Thanks. Gideon
-
For now, if a site needs non ascii page name, there are two setting needed to be set: $config->pageNameCharset = "UTF8" This is OK. $config->pageNameWhitelist = "A very long Chinese Character List" It is very hard to put all the Chinese character there. I always get complaint from my client that they find missing character in the url. Then I have to add that character manual. This is very painful and troublesome. If there is another way to whitelist all the non-ascii character would be a big plus to ProcessWire multi-language support. Forum thread: https://processwire.com/talk/topic/12776-pw-3012-support-for-extended-utf8-page-namesurls/?page=2&tab=comments#comment-146652 Feature request: https://github.com/processwire/processwire-requests/issues/393 If you think this feature is essential to you, please consider to up-vote the request to draw attention to Ryan. Thanks. Gideon
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
Gideon So replied to David Karich's topic in Modules/Plugins
Hi, Have this error this error this morning. Failed to init module: AllInOneMinify - The permissions (chmod) to delete old cache files could not be changed. ***** Solved by changing wrongly changed file permission of the minified css file. ***** Gideon -
Funding ProcessWire / More community efforts
Gideon So replied to pideluxe's topic in Wishlist & Roadmap
I third that. It can be very helpful for ProcessWire long term development. Gideon -
Hi @tcnet, New version works fine. Thanks. Gideon
-
Hi, I got this error too. PHP 7.1 MariaDB 10 ProcessWire 3.0.149 Gideon
-
Hi, Just installed this amazing module. All works fine but I am not able to embed FB videos. I get this error on the page: Video Unavailable This video may no longer exist, or you don't have permission to view it. Is there a solution for this? Thanks. Gideon
-
@cb2004, As usual, can you post us some code then we can try to give some suggestion. Gideon
-
Glad that you sorted it out yourself and I learn a lesson today. That is good. Gideon
-
Hi @spercy16, First of all, Please be kind to someone who just want to help you out even his answer is not that you want or need. Generally speaking the ProcessWire community is very kind and willing to help. I am sure you will have your help if you are kind and patient enough. For the code, @ottogal is right. You call the listChildrenTree function inside itself. This is a fatal error and your code will never work until you fix it. You cannot use $page here. $page is the reserved variable that represents the current page object. You may use $child instead. foreach ($children as $page) { Like I said above, don't call the same function within itself. if ($page->numChildren) listChildrenTree($page->children); The complete code: echo "<ul class='w-full text-white lg:block lg:float-left'>"; foreach ($children as $child) { echo "<li class='relative w-full lg:w-auto'> <a href='{$child->url}'> <div onclick='showSub()' class='block pt-2 pb-3 pl-6 lg:pr-6 button'> {$child->title} </div> </a> "; if ($child->numChildren) { echo "<ul>"; foreach ($child->children as $grandchild) { echo "<li class='relative w-full lg:w-auto'> <a href='{$grandchild->url}'> <div onclick='showSub()' class='block pt-2 pb-3 pl-6 lg:pr-6 button'> {$grandchild->title} </div> </a> "; echo "</li>"; } echo "</ul>"; echo "</li>"; } echo "</ul>"; Hope this helps or someone can improve the answer. Gideon
-
i install localhost processwire but i dont know nwxt step
Gideon So replied to dr Dogma's topic in Getting Started
Hi @dr Dogma, Do you see the login screen?? Gideon -
Page Hit Counter – Simple Page View Tracking
Gideon So replied to David Karich's topic in Modules/Plugins
Hi @antpre, I think the way this module store data does not support a multi language site. Gideon- 111 replies
-
- hitcounter
- tracking
- (and 4 more)
-
@aComAdi Add $config->pageNumUrlPrefix = Seite; to your config.php. Gideon
-
dbHost is the mysql server. Mostly is localhost. dbPass is your DB password that your mysql server host provide to you. dbName is the DB name that your host provide to you. dbUser is the username thst can use the database server. It should be provided by your host. httpHosts is the domain of your site like www.yourdomain.com Gideon
-
Use Process Wire CMS on one page not entire website?
Gideon So replied to shogun's topic in Getting Started
I run many sites in sub-directory in my development server. No problem at all. -
I would say you can do anything with ProcessWire. You need to have proper knowledge and skills but the guys here really helpful that makes life much easier. Gideon
-
Hi @fruid, What is your image field settings? If you don't set the field limit to single image, you need to do like $entry->logo->first()->url. Gideo
-
Please show us this line of code. Then we can give you some help. Gideon
-
Hi @fruid, Welcome to the forum. ProcesszWire doesn't write anything into your template file. Please go through the tutorisls first and come back for help later. https://processwire.com/docs/start/templates/ Gideon
- 7 replies
-
- permissions
- blank page
-
(and 1 more)
Tagged with:
-
I started working with VS code live server a few weeks ago. From what I learn from the video you posted here, both works more less the same. I have just found that there's a browser sync extension which support php, jsp and asp in proxy mode. https://marketplace.visualstudio.com/items?itemName=jasonlhy.vscode-browser-sync Gideon
-
What is the differences between Browser Sync and VS Code live server?? Gideon
-
Hi @alexpad, You can do it with adding inline css rules like style="background-image: url("<?php $slide->yourImageField->url; ?>") " Gideon
-
Hi @shogun, Welcome to the forum. There is no global field as far as I know. Gideon