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


Permlink Replies: 7 - Pages: 1 - Last Post: 31-May-2018 15:09 Last Post By: davidekholm
drmikey

Posts: 254
Registered: 22-Dec-2006
albumTitle question - title vs name
Posted: 30-May-2018 21:44
 
  Click to reply to this thread Reply
If you want an Album's "name" you use albumTitle. If one set's a title for that Album ( instead of it being blank) now albumTitle uses the Album title instead of the name. How would I consistently access the album's name only since there doesn't seem to be an albumName variable. Asking for a friend ...
RobM

Posts: 3,049
Registered: 4-Aug-2006
Re: albumTitle question - title vs name
Posted: 30-May-2018 22:11   in response to: drmikey in response to: drmikey
 
  Click to reply to this thread Reply
What about rootFolder.getName()
drmikey

Posts: 254
Registered: 22-Dec-2006
Re: albumTitle question - title vs name
Posted: 30-May-2018 22:49   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thanks! Any big difference compared to
imageDirectory.getName()
jGromit

Posts: 7,270
Registered: 31-Jan-2006
Re: albumTitle question - title vs name
Posted: 30-May-2018 22:57   in response to: drmikey in response to: drmikey
 
  Click to reply to this thread Reply
The imageDirectory is the current folder - rootImageDirectory is the top level. I'm a little hazy about how those relate to currentFolder and rootFolder, which would seem to be the same two things. The only obvious difference is that the first two return a File and the latter two return an AlbumObject.
RobM

Posts: 3,049
Registered: 4-Aug-2006
Re: albumTitle question - title vs name
Posted: 30-May-2018 23:40   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
The imageDirectory is the current folder - rootImageDirectory is the top level. I'm a little hazy about how those relate to currentFolder and rootFolder, which would seem to be the same two things. The only obvious difference is that the first two return a File and the latter two return an AlbumObject.
That is the difference, rootFolder gives you access to all of the folder's associated variables whilst rootImageDirectory is a reference to the file.
davidekholm

Posts: 3,545
Registered: 18-Oct-2002
Re: albumTitle question - title vs name
Posted: 31-May-2018 12:12   in response to: drmikey in response to: drmikey
 
  Click to reply to this thread Reply
From the top of my head, one way would be to do <%= rootFolder.getName() %>, but you could equally use rootImageDirectory.getName(). The 1:st way is a bit more abstracted, but they both eventually get the name from the file name of the image directory.

Edited by: davidekholm on 31-May-2018 15:08
Changed imageDirectory to the correct rootImageDirectory
jGromit

Posts: 7,270
Registered: 31-Jan-2006
Re: albumTitle question - title vs name
Posted: 31-May-2018 13:27   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
From the top of my head, one way would be to do <%= rootFolder.getName() %>, but you could equally use imageDirectory.getName().

To repeat, imageDirectory.getName() gets you the folder name, whichever folder you happen to be in. It does not return the name of the root-level folder.
davidekholm

Posts: 3,545
Registered: 18-Oct-2002
Re: albumTitle question - title vs name
Posted: 31-May-2018 15:09   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
From the top of my head, one way would be to do <%= rootFolder.getName() %>, but you could equally use imageDirectory.getName().

To repeat, imageDirectory.getName() gets you the folder name, whichever folder you happen to be in. It does not return the name of the root-level folder.


True. I fixed my typo now.
Legend
Forum admins
Helpful Answer
Correct Answer

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