You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,124

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

1

Wednesday, August 13th 2014, 2:15pm

alphabetical order

Hi,
i was wondering if it is possible to put things in alphabetical order by code.

For example
i have a list in the code with a lot of menu items. i like them to order in alphabetical order.

like:

<pic>

photo name="pic1" title="klaus" url="images/1.jpg"
photo name="pic2" title="tuur" url="images/4.jpg"
photo name="pic3" title="anton" url="images/6.jpg"
</pic>

i like the option to show them in alphabetical order of the title.
So when i add more they just come in alphabetical order, again.

Is that possible with some nice piece of code?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

panomaster

Intermediate

Posts: 275

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

2

Thursday, August 14th 2014, 10:53am

If you want to do it once try to use any editor that suports sorting lines. All you need is to remember puting title as the first attribute in each line: eg.:

Source code

1
2
3
photo title="klaus" name="pic1" url="images/1.jpg"
photo title="tuur" name="pic2" url="images/4.jpg"
photo title="anton" name="pic3" url="images/6.jpg"


If you want to do it by "nice piece of code" it could be done by javascript.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,124

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

3

Thursday, August 14th 2014, 11:30am

yeah , i know,i was thinking php, but i would prefer an krpano option.

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur