-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
You are save to just replace the files. No need to uninstall, as it doesn't install something or depend on something. Although because it was at first "autoload" and I changed that, you should check in the db table "modules" if the col "flags" of this module is set to 1 and not 3. If it's at 3 it you can just change it manually to 1.
-
Thanks Marc! Well not with the module, usually you make the pages you don't want to appear status "hidden". BTW. I just commited a new update and added support for max level. You can now use 'max_levels' => 2.
-
I just implemented a new option to prepend the rootpage to the navigation. echo $treeMenu->render( array('show_root' => true) ); Thanks Ryan! Yes I wasn't sure if that makes sense, now as you're saying it... So could I make it so that it isn't autoload and load it once before the call, and then you would have the $treeMenu->render variable? Like $treeMenu = $modules->get('MarkupSimpleNavigation'); echo $treeMenu->render(); I will change it I think, as it's better performancewise. EDIT: Just commited new version and updated first post and readme.
-
solved Is URL segment setting no longer as per the docs?
Soma replied to alan's topic in General Support
Thanks, already fixed! -
solved Is URL segment setting no longer as per the docs?
Soma replied to alan's topic in General Support
Hi and welcome to the forums. It's a fault, and should be "Urls" tab not "Advanced". Thanks for mention it! -
I took the chance to make a simple navigation module: http://processwire.c...mplenavigation/ Just commited it for download a post in the module forum. It enables you to do something like this everywhere in your templates: echo $treeMenu->render();
-
Markup Simple Navigation Module While there was a lot of people asking how to make navigation, and there were many examples around already (apeisa, ryan...) I took the chance to sit down 2-3 hours to make a simple navigation module. It has even some options you can control some aspects of the output. Installation: 1. Put this module's folder "MarkupSimpleNavigation" into your /site/modules folder. 2. Go to your module Install page and click "Check for new modules". It will appear under the section Markup. Click "install" button. Done. Technically you don't even need to install it, after the first load call ( $modules->get("MarkupSimpleNavigation") ) it will install automaticly on first request if it isn't already. But it feels better. However, it will not be "autoloaded" by Processwire unless you load it in one of your php templates. Documentation: https://github.com/somatonic/MarkupSimpleNavigation/blob/master/README.md Modules Repository processwire.com https://processwire.com/modules/markup-simple-navigation/ Download on github https://github.com/somatonic/MarkupSimpleNavigation Advanced example with hooks creating a Bootstrap 2.3.2 Multilevel Navbar https://gist.github.com/somatonic/6258081 I use hooks to manipulate certain attributes and classes to li's and anchors. If you understand the concept you can do a lot with this Module.
-
Apeisa is right and it's by far the best approach. Don't worry even simple minded non tech people will understand how to add a page that will serve as a category. It doesn't need to be hidden, only the "/catergory/" page that holds the categories. It can't get any simpler than having a page called Categeory, then click it and click "new". Voila. You can even setup the template to only allow "category" templates as childrens under the tab "Family" in the template settings. After that you can in future even add fields like description and images, so the category could have meta data displayed. And as apeisa mentioned it even allows for multiple categories selected, the page inputfield will allow very versatile usage. There's a real connection that is most flexible. Your solution is very limited and unflexible and to my understanding even more complicated to the site admin to add a weird 1:=Label and it allows for errors very easy. No way to screw up with the page select approach. Anyway you could try this with your code, it was a real mess I guess no problem this "should" work: $features = $page->children("magazine_section=A"); if ($features->count() > 0){ echo "<h2>Feature Articles</h2>\n<ul>"; foreach($features as $feature) { echo "\n\t<li><a href='{$feature->url}'>{$feature->article_title}</a></li>\n"; } echo "</ul>\n"; }
-
Thanks Ryan, it was autoloading the js on module page even though it shouldn't (?). SInce the module isn't loaded there's missing config it would spit out. I renamed the js and load it explicitly on init to avoid this problem.
-
I just updated the cheat-sheet to avoid confusion. Thanks! They're always are cheating!
-
I just pushed a first version for testing to github. See first post for Infos. Edit: While at it. Ryan, I can't deinstall the module, the deinstall field is disabled to open on the module page. Why is that? How would it be possible to get it to work?
-
Then Nicos migrate thread from Typo3 or Wordpress could be added
-
What is "$child->link_intern_url"? if it's a page from a page reference it should reuturn the page object. so you should be able to do: $url = $child->link_intern_url->url;
-
I just tried and it's working as expected. Whether inside or outside a function. echo wire("pages")->get(1002)->url;
-
Ryan, I remember we had this issue already once. Well I don't have much installed ,stayontabs, thumbnails, datatable. And I have just recently installed latest PW 2 days ago. Can't get it to work. Edit: Repeaters doesn't get copied when using page clone. When I create page with repeaters and add 1-2 elements and clone that page with children, the repeater elements created doesn't get cloned, AND worse the original page loses it's repeater elements too.
-
I tested again, it show an default thumb when hovered, but when I click the link I get an error: Fatal error: Call to a member function get() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/pw-dev/site/modules/Thumbnails/ProcessCropImage/ProcessCropImage.module on line 50 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.
-
when Doesn't this deserve a new thread? Shame it's hidden somewhere here in the repeater thread, some might miss this easily. BTW. found an issue with repeater field label specified doesn't get saved on first step after saving.
-
When a new field created, if hit save without selecting a fieldtype it throws an white page error. Fatal error: Call to a member function attr() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/pw-dev/wire/modules/Process/ProcessField/ProcessField.module on line 636 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.
-
Repository of php Scripts for Templates
Soma replied to thetuningspoon's topic in Wishlist & Roadmap
I think it would be great and make sense to have repositories of scripts and modules that are approved by the PW members to ensure they're quality modules. With launching the new PW website we're working on it will come. -
I'm already loving it without trying! Awesome work Ryan, thanks for implementing this, diogo is right , this is playing in a whole new league.
-
The thumbnails module doesn't work with repeaters, the edit link goes to a page that doesn't resolve.
-
I often use "open in new tab" command function of the browser to keep the tree open where it is. Also doing this in many other cases.
-
function listChildrenTree($children, $current, $w) { echo "<ul>"; foreach($children as $page) { $class = ''; if($page === $current || $current->parents->slice(1)->has($page) ) { $class = "class='on' style='font-weight:bold'"; } $rootid = $w->pages->get("/")->id; echo "<li><a href='{$page->url}' $class>"; if($page->id == $rootid) echo "<img src='" . $w->config->urls->templates . "styles/images/home.png' width='24' height='28' alt='' />"; echo "{$page->title}</a> "; if($page->numChildren && $page->id != $rootid) listChildrenTree($page->children, $current, $w); echo "</li>"; } echo "</ul>"; } $children = $pages->get("/")->children(); $children->prepend($pages->get("/")); listChildrenTree($children, $page, $wire);
-
I think landitus means the other way round. Edit: By "goes" to, do you mean it redirects to it? Like if you enter the long address it instead loads http://domain.com/categories/ also in the address bar? And simply show the /categories page? I think I'm not getting it still.
-
I'm just thinking wouldn't it better to be able to really create the page in a modal dialog of a template specified? I'm thinking because if I often need to create multi-language page and in case of categories I use multiple title fields one for each language. This way with new lines is suited well for things like names that would be neutral.