-
Posts
339 -
Joined
Everything posted by ottogal
-
Learned something new here, too. Thanks to all.
-
Did you use the Page Add Bookmark Editor to create the wanted bookmark under Add New ?
-
Just guessing: Shouldn't you change RewriteBase / to RewriteBase /html/ ?
-
Bump...
-
After clearing the cache tables from the database, you should refresh the modules (Admin > Modules, green Button "Refresh" on top).
- 1 reply
-
- 1
-
-
Of course it wouldn't work like I proposed since the function treeMenu() is called recursively... So better try kongondo's example. Or try to put the wrapping ul tag out of the function: <?php function treeMenu(Page $page = null, Page $rootPage = null) { if(is_null($page)) $page = wire('page'); if(is_null($rootPage)) $rootPage = wire('pages')->get('/'); $tree = ""; $parents = $page->parents; foreach($rootPage->children as $child) { $class = "level-" . count($child->parents); $s = ''; if($child->numChildren && $parents->has($child)) { $class .= " on_parent"; $s = str_replace("\n", "\n\t\t", treeMenu($page, $child)); } else if($child === $page) { $class .= " on_page"; if($page->numChildren) $s = str_replace("\n", "\n\t\t", treeMenu($page, $page)); } $class = " class='$class'"; $tree .= "\n\t<li>\n\t\t<a$class href='{$child->url}'>{$child->title}</a>$s\n\t</li>"; } return $tree; } $out = "\n<ul>\n\<li>\n\t\t<a href='{$rootPage->url}'>{$rootPage->title}</a>\n\t</li>"; $out .= treeMenu(); $out .= "\n</ul>"; echo $out; Note that I changed the local variable $out in the function to $tree. (I didn't test that myself...)
-
Try to replace the line $out = "\n<ul>"; with this one: $out = "\n<ul>\n\<li>\n\t\t<a href='{$rootPage->url}'>{$rootPage->title}</a>\n\t</li>"; (adding a class to the a element and modifying the \t tabs as needed).
-
ProcessSlider - Image sliders for ProcessWire
ottogal replied to mauricius's topic in Modules/Plugins
... the Forum? Anyway: Welcome! -
You could just set a bookmark to the Recently Updated Topics page (or to the Unread Content page). Or even make it the start page of your browser...
-
Interesting way to handle many css files. But, to avoid misunderstanding, wouldn't it have been better to replace the term "module" with something else?
-
Users having a role of "editor" are not able to add new entries to the list of Page add bookmarks (introduced in PW 2.6.17). In my use case, there are several "album" pages containing gallery pages as their children. Editor users are allowed not only to create a new gallery page within an existing album, but also to create a new album page. When a new album page is created, I want to have automatically added a bookmark to it in the Page add bookmarks list, to let him easily add galleries to that album. I think I need some sort of Hook to achieve this (but never used Hooks before). Any help gladly appreciated.
-
This option is already switched off for the templates in question...
-
Hi all, since there is already the Add New menu item under Pages, I want to remove the green button with the same functionality (Default admin theme). How do I do it?
-
Module HelperFieldLinks - field and template edit shortcuts
ottogal replied to Soma's topic in Modules/Plugins
For a while now I run into the before-mentioned "Array to string conversion" issue on editing a page: else if(is_array($data_value)){ $data_value = implode("|",$data_value); } $settings_str .= "<span>$data_key:</span> $data_value<br/>"; It occurred in PW 3.0.18 and now in PW 3.0.20, too. -
As far as I see, the include attribute is working only with find(), not with get().
-
Thank you for having brought this back in mind...
-
Hi all, I've got a problem with combo boxes like here: Since the German word for heading is longer, the box is too narrow and cuts off the entries. So I looked how i could modify the width. I spotted a file named editor_gecko.css with this definition and thought it might be the relevant one: .cke_combopanel { width:150px; height:170px } Hence I added the following to my contents.css in /site/modules/InputfieldCKEditor: .cke_combopanel { width:200px; height:240px; } But nothing changed. Obviously the wrong idea. Some of you might have a better one - ?
-
Working well!
-
Strange: I'm in Firefox. The Web Developer Tool says the image could not be loaded - likewise in both cases, be it /site/assets/files/1/ or /site/assets/files/1/logo.svg ! (Even if in the second case it is shown on the page...)
-
Many thanks to both of you! Either solution works well. (It's not possible to mark both posts as Solved...) And again I learnt something...
-
@matjazp Is it necessary to modify both the files jquery.longclick.js and jquery.longclick.min.js? Alternatively, is it possible to override them (or it) by a modified version located in /site/modules/? What should be the right path? @tpr Looking forward to this module, seems interesting! (No suggestions atm to add, though.)
-
Where do I find this?
-
The time for triggering the Long-click modal actions (introduced in PW 3.0.9) should be slightly longer to avoid erraneously opening a modal window. Some editor users (who normally don't use it) get irritated when the reaction to their "short" click is unusual.
-
Perhaps the "Files" settings of your templates are different? Without knowing the templates and their settings it's not easy to help...
-
On your homepage you have style="background-image:url(/site/assets/files/1/)" instead of style="background-image:url(/site/assets/files/1/logo.svg)" which seems to explain the issue...