cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Nav Bar

dotcombubble
Champ in-the-making
Champ in-the-making
Hi,
Has anyone implemented a dynamic navigation bar in the community?
I know the Alfresco.com site itself uses one, so I'm hoping others here might have the know how.

What I'd like is a Nav Bar that automatically updates itself if I create a content page using a webform. I've seen something like I wanted done in the press release demo, but this uses the alfSmiley TonguearseXMLDocuments call to build a list of press releases under the specific category. Is this the bones of how a dynamic nav bar would be implemented? or is there a better way?

Thanks for any input.
9 REPLIES 9

ssaravanan
Champ in-the-making
Champ in-the-making
You can find a good working example on the following site, which is based on SURF platform
http://www.benh.co.uk/alfresco/surf-part-2-pages-and-navigation/
The above example builds a dynamic nav for your site.
The other option is having a dynamic nav based on Categories using a webscript.
You can find more examples on the following link
http://zaizi.wordpress.com/

dotcombubble
Champ in-the-making
Champ in-the-making
Thanks very much for the reply.

I tried the example from:

The other option is having a dynamic nav based on Categories using a webscript.
You can find more examples on the following link
http://zaizi.wordpress.com/

But it didn't work and there's not much direction provided there apart from dropping the two files into the data dictionary (I'm assuming the html should be in a seperate file, which I dropped into the root of my webapp).

Have you any more information on how to try this example. I am using Alfresco Labs 3c, not using Surf.

Thanks.

ssaravanan
Champ in-the-making
Champ in-the-making
The webscript when invoked using /alfresco/service/getCategories gives a json response.
The Json response then has to be parsed in your front end logic to display the navigation bar.
http://zaizi.wordpress.com/, the same example on that link can be found on the below link in
(https://sites.google.com/site/alfrescotutorials/Home/alfresco-category-webscript)
a better readable format and I have tested the example again, it seems to be working.
That example is not for dynamic nav bar , but for getting categories.

You can find some logic for that dynamic nav bar on the green energy site which can be
downloaded using the following link http://ecmarchitect.com/images/green-energy-code-camp-assets.zip
but thats for SURF.
Anyway, you have to drop in your own css logic for the nav drop downs and identifying root level & child navs.
Hope the above green energy example will give you more info on dynamic navs in Alfresco.

dotcombubble
Champ in-the-making
Champ in-the-making
Thanks again, but I am now getting the alert from the failure function everytime I try the callout
failure : function (o) {
      if (!YAHOO.util.Connect.isCallInProgress(o)) {
          alert("Async call failed!");
      }
  },

Any ideas why?

ssaravanan
Champ in-the-making
Champ in-the-making
I too was getting the same error on Safari, but seems to be working on
Mozilla. That example simply links the categories to a drop down list using YUI and am
not sure whether that eg will be of use for building a dynamic nav. I am currently working on one
of your same requirements, but thats on SURF. So, if you manage to get it up, feel free to drop
how you did it with the community.

alfhunt
Champ in-the-making
Champ in-the-making
Hi All,
           I am new to the Alfresco wcm. I have a requirement to implement the dynamic navigatio bar for a website. Please help me to get this done

ben
Champ in-the-making
Champ in-the-making
If you are new to Alfresco WCM, take a look at the Web Quick Start. This uses the default (non AVM ) store and delivers dynamically (including navigation).

Install Guide, User Guide and Developer Guide - http://wiki.alfresco.com/wiki/Web_Quick_Start

Overview blog article - http://www.benh.co.uk/alfresco/web-quick-start/web-quick-start-first-look/

Regards, Ben.

alfhunt
Champ in-the-making
Champ in-the-making
Thanks a lot Ben!

armandtan
Champ in-the-making
Champ in-the-making
I have managed to work out a system to managing a dynamic Navigation using Alfresco.

It's pretty cool, using one web form to contain references to a list of other 'nav option' web forms.  The form looks like:

Label        NormalizedText
Link          TargetURI

Then injecting a freemarker .ftl file into the host (first) web form which will then systematically grab the .xml content of each referenced .xml file to create one complete .xml file ready for rendering.

Using a script to poll the content we can keep this nav .xml up to date.

If you're interested - you're welcome to ask for more details.

Regards

Armandtan