Page 1 of 1

How to implement scene/panorama dependance in template

PostPosted: Tue Mar 11, 2014 9:57 am
by Lain Iwakura
Hello. Yesterday I upgrade my PTP 1.8 to PTP 2.0.1 and start to learn its new features. It is a very good GUI now, and have alot of new great features, except you must learn django templates for full usage of it. :)
For start I decide to build plugins for all my interfaces that I did in the past. And in many of them I used panorama dependance. For example I did banner in the topright with the title of panorama or use different photos in photo gallery in different panoramas.
Any advice how it may be implemented in template?

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 11:11 am
by franzkekko
Tell me if I understood right.
You want to have different galleryes for your virtual Tour?
Add more than one Gallery plugin to your template, and give them different names. Now add for each gallery the photos you want.
Afther that, galleryes won't be shown on your themplate.
Based on what you want, you can:
- add more Simple Button Plugin and give it an icon and in the advanced options call the Action->[Plugin]Gallery with the name you gave before.
- add more hotspot icons (bottom left on the interface of ptp2) calling Action->[Plugin]Gallery with the name you gave before. After that you can add an hotspot on each panorama that will call the gallery.

If you want to add a fixed-positioned button on the template that call different galleryes basing on active panorama, I can't help you, but should be interesting for me too. =)

Excuse me for eventual grammar mistakes, I'm Italian ;)

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 12:19 pm
by Lain Iwakura
franzkekko wrote:Tell me if I understood right.
You want to have different galleryes for your virtual Tour?
Add more than one Gallery plugin to your template, and give them different names. Now add for each gallery the photos you want.
Afther that, galleryes won't be shown on your themplate.
Based on what you want, you can:
- add more Simple Button Plugin and give it an icon and in the advanced options call the Action->[Plugin]Gallery with the name you gave before.
- add more hotspot icons (bottom left on the interface of ptp2) calling Action->[Plugin]Gallery with the name you gave before. After that you can add an hotspot on each panorama that will call the gallery.


Hello. Thats cool advices, I will use them in the future, but my goal is different.

franzkekko wrote:If you want to add a fixed-positioned button on the template that call different galleryes basing on active panorama, I can't help you, but should be interesting for me too. =)


Yes. I want this and many other things like that. Something that based on active panorama

franzkekko wrote:Excuse me for eventual grammar mistakes, I'm Italian ;)


No problem. I'm russian, so I'm sure I did alot of mistakes in my posts :)

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 12:32 pm
by mediavets
Lain Iwakura wrote:
franzkekko wrote:Tell me if I understood right.
You want to have different galleryes for your virtual Tour?
Add more than one Gallery plugin to your template, and give them different names. Now add for each gallery the photos you want.
Afther that, galleryes won't be shown on your themplate.
Based on what you want, you can:
- add more Simple Button Plugin and give it an icon and in the advanced options call the Action->[Plugin]Gallery with the name you gave before.
- add more hotspot icons (bottom left on the interface of ptp2) calling Action->[Plugin]Gallery with the name you gave before. After that you can add an hotspot on each panorama that will call the gallery.


Hello. Thats cool advices, I will use them in the future, but my goal is different.

franzkekko wrote:If you want to add a fixed-positioned button on the template that call different galleryes basing on active panorama, I can't help you, but should be interesting for me too. =)


Yes. I want this and many other things like that. Something that based on active panorama

franzkekko wrote:Excuse me for eventual grammar mistakes, I'm Italian ;)


No problem. I'm russian, so I'm sure I did alot of mistakes in my posts :)


Plugins are currently tour-wide rather than pano -specific.

Other than the Title plugin, in the sense that the title text is pano-specific.

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 12:38 pm
by Lain Iwakura
mediavets wrote:Other than the Title plugin, in the sense that the title text is pano-specific.


Maybe you can use this text for coding purpose? :/
For example if title text contain part of the code, you can insert that part in other code dynamically. :/

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 3:18 pm
by benji33
I don't understand the request but look after some plugins templates files like description/description.tmpl.
There is some Grantlee/Django string as {% ifequal p.description_title_source.mode "currentpanorama" %} and krpano code like get(scene[get(xml.scene)].name)

Perhaps it can help ?

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 3:33 pm
by Lain Iwakura
benji33 wrote:I don't understand the request but look after some plugins templates files like description/description.tmpl.
There is some Grantlee/Django string as {% ifequal p.description_title_source.mode "currentpanorama" %} and krpano code like get(scene[get(xml.scene)].name)

Perhaps it can help ?


Thanks for advice, I will look at that.

And what didn't you understand exactly? You have plugin and you want it to show only in specific panoramas. Or you want your plugin to change on different panoramas. For example you have a banner at topright that have a name of the place you are in. On all panoramas of hall it contains text "Hall" and when you move to kitchen it changes text to "Kitchen".

Sorry for my english, it may contain many mistakes.

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 3:44 pm
by benji33
Ok for panorama specific panotour doesn't do the work yet.

But for the change on different panorama you can do it with the use of get(scene[get(xml.scene)].name) for instance to get the current scene name or other attributes of the scene or with get(panoramagroup[get(scene[get(xml.scene)].group)].name) for a group of scenes for instance.

Re: How to implement scene/panorama dependance in template

PostPosted: Wed Mar 12, 2014 4:18 pm
by Lain Iwakura
benji33 wrote:Ok for panorama specific panotour doesn't do the work yet.

But for the change on different panorama you can do it with the use of get(scene[get(xml.scene)].name) for instance to get the current scene name or other attributes of the scene or with get(panoramagroup[get(scene[get(xml.scene)].group)].name) for a group of scenes for instance.


Thanks. I think that is what I look for. I will try it.