This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 1 - Pages: 1 - Last Post: 25-Mar-2013 00:20 Last Post By: monkeyboy Threads: [ Previous | Next ]
omen

Posts: 1
Registered: 27-Dec-2009
Dtree - mainpage witch default opened one of node
Posted: 24-Mar-2013 22:27
 
  Click to reply to this thread Reply
Hi all

Parameters of tree menu structure can be defined in SimpleViewer settings. There I can set all nodes to open or close when main galerry page is starting.

Question is:
I would like to start main page of gallery with default expanded one of node (subgalleries). How to do it ?

When I trying to put in javascript command a.openTo(1, true); then nothing happens !
monkeyboy

Posts: 1,213
Registered: 21-Jun-2008
Re: Dtree - mainpage witch default opened one of node
Posted: 25-Mar-2013 00:17   in response to: omen in response to: omen
Helpful
  Click to reply to this thread Reply
As well as adding code such as the following (to open the correct node on the tree and have it show as being selected):
a.openTo(1, true);
a.s(1);

... you will have to change the default page to be opened in the iframe by changing the following line (in the 'index.html' page):
var targetPage="gallery.html";

... to something like:
var targetPage="subfolder/gallery.html";

Otherwise, just open the 'gallery.html' page of the subfolder whose gallery you wish to view in a browser and the skin will do the rest (redirecting the browser to the 'index.html' page with the menu but with the selected gallery open).
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums