Navigation

Skip to end of metadata
Go to start of metadata

  Navigation plugin

This plugin is design for the creation of menus, sitemap and breadcrumbs.

The concept is to build a tree with pimcore elements like documents, folder and objects. After the plugin will generate for you an object type Zend_Navigation, that you will transform easily in sitemap, menu ... with only 2 lines of php !

This is possible with the Navigation view helper of Zend_Framwork.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 23, 2011

    Sandeep Narwal says:

    how can i download Navigation plugin?

    how can i download Navigation plugin?

    1. Jun 23, 2011

      Alexandre Delattre says:

      Hi sandeep, This plugin was downloadable in the previous plugin hub. I try to ...

      Hi sandeep,

      This plugin was downloadable in the previous plugin hub.

      I try to publish it now.

      Wait 5 minutes ;)

  2. Jun 23, 2011

    Alexandre Delattre says:

    I have share it. Try, an let me know if it work, please. Thanks

    I have share it.

    Try, an let me know if it work, please.

    Thanks

  3. Aug 19, 2011

    Thomas Verbiest says:

    First thanks for this job Alexandre, Just little fix : On the Class Navigation...

    First thanks for this job Alexandre,

    Just little fix :

    On the Class Navigation_Navigation line 448 there's a small mistake, you use $node var name in place of $confNode

    Before fix :

    $navNode->setLabel($doc->getProperty($node->ch_proplabel));

    After fix :

    $navNode->setLabel($doc->getProperty($confNode->ch_proplabel));

    This fix used of custom property for label.

    Bye

  4. Aug 20, 2011

    Alexandre Delattre says:

    Thanks for the hint ! I have fix the plugin, and I have adding a preview bu...

    Thanks for the hint !

    I have fix the plugin, and I have adding a preview button.

    Cheers

  5. Sep 12, 2011

    Ashar says:

    Hi I have tried to download the plugin but it does not seem to go beyond 3%. I ...

    Hi

    I have tried to download the plugin but it does not seem to go beyond 3%. I was wondering if the plugin is huge in sze so much so that it takes a while to download. I have tried to download another plug in and the other plugin was downloaded successfully.

    I have just installed pimcore today :)

    Thank you.

    1. Sep 12, 2011

      Alexandre Delattre says:

      I have just try to download it. It work fine. I have download it in approximate...

      I have just try to download it. It work fine.

      I have download it in approximately 20 seconds.

  6. Sep 15, 2011

    Ashar says:

    Hi Alexandre I have tried downloading it again today. Here is a video of it. ...

    Hi Alexandre

    I have tried downloading it again today.

    Here is a video of it.

    http://screencast.com/t/PQZ65mSMcR

    I cant't seem to be able to download it. I have tried other plugin to download and it works. Any ideas?

    Thank you.

    Best regards,

    Ashar

  7. Sep 15, 2011

    Alexandre Delattre says:

    Please use the forum for that kind of issue. Have you a skype account ?

    Please use the forum for that kind of issue.

    Have you a skype account ?

  8. Sep 21, 2011

    Kemper & Ko says:

    Is it possible to limit the number of subitems found? I want to use this to show...

    Is it possible to limit the number of subitems found? I want to use this to show the newest childs of a document (blog).

  9. Sep 21, 2011

    Alexandre Delattre says:

    You can limit the depth but not quantity... Sorry

    You can limit the depth but not quantity... Sorry

    1. Sep 21, 2011

      Kemper & Ko says:

      Will this be available in the future?

      Will this be available in the future?

      1. Sep 21, 2011

        Alexandre Delattre says:

        It could, but not for the moment. I am busy ....

        It could, but not for the moment. I am busy ....

  10. Oct 05, 2011

    Thomas Keil says:

    I added a little Improvement; the plugin ignores the Navigation Name of folders,...

    I added a little Improvement; the plugin ignores the Navigation Name of folders, this little patch adds this functionality.

    File lib/Navigation/Navigation.php

    change this (line ~248)

    if ($child instanceof Document_Folder) {
                        if ($confNode->ch_folder != "1") {
                            
    
                            if ($confNode->ch_labelselect == "property") {
                                $tempNode->setLabel($child->getProperty($confNode->ch_proplabel));
                            } else {
                                $tempNode->setLabel($child->getKey());
                            }
                            
                            if ($child->hasChilds() == true) {
                                $tempNode->addNode($this->recursiveDocTree($confNode, $child->getChilds(),$death+1,$rules));
                            }
                        }
                    }
    

    to

     if ($child instanceof Document_Folder) {
                        if ($confNode->ch_folder != "1") {
    
                                                    switch($confNode->ch_labelselect) {
                                                        case "property":
                                                            $tempNode->setLabel($child->getProperty($confNode->ch_proplabel));
                                                            break;
                                                        case "name":
                                                            $tempNode->setLabel($child->getProperty("navigation_name"));
                                                            break;
                                                        default:
                                                            $tempNode->setLabel($child->getKey());
                                                            break;
                                                    }
                                                    
                                                    if ($tempNode->getLabel() == "") $tempNode->setLabel($child->getKey());
    
                            if ($child->hasChilds() == true) {
                                $tempNode->addNode($this->recursiveDocTree($confNode, $child->getChilds(), $death + 1, $rules));
                            }
                        }
                    }
    

    Thanks for your good work!

    Thomas

  11. Oct 05, 2011

    Thomas Keil says:

    Darn, the indention is totally messed up - sorry for that, but I guess you see t...

    Darn, the indention is totally messed up - sorry for that, but I guess you see the changes :)

    1. Oct 05, 2011

      Alexandre Delattre says:

      Hi Thomas ! Thanks for the hint, but I have 2 remarks : 1- In Pimcore ...

      Hi Thomas !

      Thanks for the hint, but I have 2 remarks :

      1- In Pimcore 1.4.1 build 1477, the core navigation setting is no longer supported for folder...

      2- Like you write in your snippet, this is a custom property, so you can directly set "navigation_name" in the field without adding a new option.

      Cheers

      And really thanks for the feedback !!!

      1. Oct 05, 2011

        Thomas Keil says:

        Ah, I see what you mean with the navigation_name property. OK, I wanted to do i...

        Ah, I see what you mean with the navigation_name property.

        OK, I wanted to do it according to the conventions already used with the Documents ;-)

        The lack of navigation settiongs support for folders in the curren build is a problem though. Why has this been removed, and what can we do besides "don't update"?

        Cheers

        1. Oct 05, 2011

          Alexandre Delattre says:

          For the navigation setting, I don't know why they have remove it, but it doesn't...

          For the navigation setting, I don't know why they have remove it, but it doesn't matter for me, because I don't use it ;)

          In my case, I always remove the settings and Property tabs with a plugin in every costumer website, Because it is really not userfriendly.

          Cheers

  12. Dec 21

    Thomas Schulze says:

    I use pimcore 1.4.2 build 1500 and can't activate the navigation plugin. It thro...

    I use pimcore 1.4.2 build 1500 and can't activate the navigation plugin. It throws an exception. In the debug.log I can see that it tried to access the non existing table pimcore_sitemap. So I manual created the table from the lib/Sitemap/Plugin.php.

    1. Feb 15

      Thomas Keil says:

      In plugins/Sitemap/lib/sitemap/Plugin.php change this:     Pimcore_AP...

      In plugins/Sitemap/lib/sitemap/Plugin.php change this:

          Pimcore_API_Plugin_Abstract::getDb()->exec("CREATE TABLE IF NOT EXISTS `plugin_sitemap` (
      to
          Pimcore_API_Plugin_Abstract::getDb()->query("CREATE TABLE IF NOT EXISTS `plugin_sitemap` (

          Pimcore_API_Plugin_Abstract::getDb()->exec("DROP TABLE `plugin_sitemap`");
      to
          Pimcore_API_Plugin_Abstract::getDb()->query("DROP TABLE `plugin_sitemap`");

          } catch (Zend_Db_Statement_Exception $e)
      to
          } catch (Exception $e)

      This fixed some errors for me.

  13. Apr 17

    gansta says:

    Great plugin! Is there a way to order objects from an object folder by a sp...

    Great plugin!

    Is there a way to order objects from an object folder by a special object field, e.g. name or a given sort order?

    Also I got some problems with the routing, the added route pattern: /\/product\/(.*)([0-9]+)/ and reverse: /product/%s%s ends in the url: error_in_your_url_configuration:~one_parameter_is_missing_to_generate_the_url

  14. Apr 19

    Alexandre Delattre says:

    It is not possible to order object from a special field, because you can have di...

    It is not possible to order object from a special field, because you can have different object class, so it is limited to the standard fields...

    Concerning the routing, try to use explicite reverse by replacing "%s" by a variable name.

    Cheers

    1. Apr 20

      gansta says:

      thx a lot I added a sort routine to the Navigation class to check for an object...

      thx a lot

      I added a sort routine to the Navigation class to check for an object "order" variable

      private function recursiveDocTree...
      
                  if ($tempNode instanceof Navigation_Navnode) {
                      // get index to sort
                      $index = $counter;
                      if (isset($child->order)) {
                          $index = $child->order;
                      }
      
                      // if index isset already just add at the end
                      while (isset($sortedNodes[$index])) {
                          $index++;
                      }
                      $sortedNodes[$index] = $tempNode;
                      $counter++;
                  }
              }
      
              // sort nodes
              ksort($sortedNodes,SORT_NUMERIC);
      
              // walk over array and add nodes
              foreach ($sortedNodes as $index => $currentNode) {
                  $navNode->addNode($currentNode);
              }

      also i added the possibility to add hardlinks to the navigation:

                      if ($child instanceof Document_Hardlink) {
      
                          $child = $child->getSourceDocument();
                          $tempNode = $this->buildChildDoc($confNode, $child);
                          if ($child->hasChilds() == true && ($tempNode instanceof Navigation_Navnode)) {
                              $tempNode->addNode($this->recursiveDocTree($confNode, $child->getChilds(), $death + 1, $rules));
                          }
                      }

      and instead of

          $navNode->setLabel($doc->getTitle());

      you should use

          $navNode->setLabel($doc->getProperty("navigation_title"));

      but I still got a problem:

      Using my static route: /products/%name_%id my links are generated, e.g. id:1, name: "great product" -> /products/great+product_1

      Where is this URL-generating?

      The function Website_Tool_Text:toUrl would return great-product_1

  15. Apr 23

    Grzegorz says:

    After upgrade to v1.4.5 I cannot edit or create new navigation structures. I hav...

    After upgrade to v1.4.5 I cannot edit or create new navigation structures. I have error in Firebux every time I click on the navigational item.

    TypeError: invalid 'instanceof' operand Ext.ux.form.SuperField
    line 150 of base.js file:
    if(!(item instanceof Ext.ux.form.SuperField) && !(item instanceof Ext.form.DisplayField)){
    

    What is wrong? Now I'm stucked with page development - I cannon add new pages to menus.

    1. Apr 23

      Alexandre Delattre says:

      It seems pimcore team have remove the superfield of extjs since pimcore 1.4.5. ...

      It seems pimcore team have remove the superfield of extjs since pimcore 1.4.5.

      I will look at it.

    2. Apr 24

      Thomas Keil says:

      Have a look at [http://www.pimcore.org/board/viewtopic.php?p=2166#p2166...

      Have a look at [http://www.pimcore.org/board/viewtopic.php?p=2166#p2166\||]

      It's for the formbuilder plugin, but it also applies to the navigation plugin.

      Maybe that helps you until the plugin is officially fixed

      Edit: sorry, the wiki somehow keeps f***ing up my link - please copy it manually...

      1. Apr 24

        Grzegorz says:

        Thank you Tomas! This helped :) To keep everything in one place. 1. Downlo...

        Thank you Tomas! This helped :)

        To keep everything in one place.

        1. Download this file and extract it to plugins/Sitemap/static/js/SuperField/
        (http://www.pimcore.org/board/download/file.php?id=58&sid=012ab423608bd6fe1d6d4fc6fef1bf89)

        2. alter plugins/Sitemap/plugin.xml to add necessary lines.

         <pluginJsPaths>
              <path>/Sitemap/static/js/SuperField/SuperField.js</path>
              <path>/Sitemap/static/js/sitemapplugin.js</path>
              <path>/Sitemap/static/js/settings.js</path>
              <path>/Sitemap/static/js/comp/menu.js</path>
              <path>/Sitemap/static/js/comp/type/base.js</path>
              <path>/Sitemap/static/js/comp/type/document.js</path>
              <path>/Sitemap/static/js/comp/type/doctype.js</path>
              <path>/Sitemap/static/js/comp/type/docfolder.js</path>
              <path>/Sitemap/static/js/comp/type/object.js</path>
              <path>/Sitemap/static/js/comp/type/objectfield.js</path>
              <path>/Sitemap/static/js/comp/type/objectfolder.js</path>
              <path>/Sitemap/static/js/comp/type/routemap.js</path>
              <path>/Sitemap/static/js/composite/compositeFieldExtended.js</path>
            </pluginJsPaths>
            <pluginCssPaths>
              <path>/Sitemap/static/js/SuperField/ux-superfield.css</path>
              <path>/Sitemap/static/css/admin.css</path>
            </pluginCssPaths>
        

        Now everything works correctly.