You are not logged in.

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 287

Location: Berlin

  • Send private message

1

Sunday, June 19th 2011, 12:36am

use "include" to load from different folders

Hello,

I'm trying to use the value of variables to control, from which folder an include loads XML-code from to display different text information.

The variables are changing and I can trace their values to be correct, so this part is ok already.

So, lets say, if I have the value room1, I want the include to load from the url "room1/01.xml", "room1/02.xml" etc.

Something like:

Source code

1
<include url="../".get(folder)."/01.xml" />    


does not work, but how is the right syntax for this then?

Hope this is possible at all though....

Any help appreciated.

Michael

panomaster

Intermediate

Posts: 277

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

2

Monday, June 20th 2011, 9:32am

It will work with PHP, but not KRPano. It's because wrong concatenation syntax.

You can use txtadd function to concat whole path and then use get(folderpath) (or any variable you will create). But Klauss once said there's no way to including xml dynamically so perhaps it won't work, and you shold try to find another way to solve this problem.

mstoss

Intermediate

  • "mstoss" started this thread

Posts: 287

Location: Berlin

  • Send private message

3

Monday, June 20th 2011, 1:58pm

Yes, I was aware of the wrong syntax. So, you are saying, that apart from the syntax, my approach is not possible because XMLs can not be dynamically included. Hm I see.

Thank you very much for pointing that out to me. I'll try to find another solution.

Michael

panomaster

Intermediate

Posts: 277

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

4

Monday, June 20th 2011, 2:31pm

I only said what Klaus once said. Maybe the situation has little changed?

VN2011

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

5

Monday, June 20th 2011, 3:00pm

as far as i know you still cannot dynamically use includes.

panomaster

Intermediate

Posts: 277

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

6

Monday, June 20th 2011, 3:13pm

... however you can use KRPano JS interface and asynchronous communication...