Bootstrap Top Navbar Issues   [SOLVED] - View the solution

This sub-forum is for discussing and reporting bugs on any content that is not available by default in Panotour, so this concerns custom HTML templates, extra plugins (both Kolor-provided and third-party), etc...

Ce sous-forum a été créé pour discuter et/ou rapporter des bugs sur tout contenu qui n'est pas disponible par défaut dans Panotour, donc cela concerne les templates HTML customisés, plugins supplémentaires, etc...
no avatar
New member
Topic author
Posts: 1
Likes: 1 post
Liked in: 0 post
Joined: Thu May 25, 2017 11:29 am

Bootstrap Top Navbar Issues

by GD-Steven » Thu May 25, 2017 11:51 am


I'm new to Panotour and I'm trying to figure out how to customise the Boostrap Top Navbar Template.

I want certain PanoGroups that the name contains a particular string to be a simple list item that links to the first of the group instead of a dropdown with all the elements shown.

I have tried checking the name of the PanoGroup and if it contains a particular substring then create a list item, this would happen after the if group.isExplicit statement.

For example,
Code: Select all
{% if group.isExplicit %}
    {% if "groupsingle" in %}
         ......Create list item with the group name and first pano link
    {% else %}
        .......Create the select dropdown (the code that is already there)
    {% endif %}
    .....Rest of the normal code
{% endif %}

However, when I have tried building the project after this change, it would return saying "if statement improperly formatted".

I have checked the documentation and have tried the if statement with particular strings i.e
Code: Select all
{% if "abc" in  "abcdef" %}

Does anyone see what I am doing wrong? Or is there a different method to do what I am trying to do? Or some in-built function that I am missing?

User avatar
Posts: 418
Likes: 15 posts
Liked in: 163 posts
Joined: Wed Dec 17, 2014 12:37 am
Location: León, Nicaragua

Re: Bootstrap Top Navbar Issues

by 360-compunics-com-ni » Thu May 25, 2017 9:50 pm

Not sure which Django version introduced the "in" operator, but i suppose it's because of this that the string comparison does not work as expected. Maybe someone from Kolor can verify this - the plugin documentation links to version 1.1 of the Django builtins, which is from 2009.
Out now: DeviceCheck for PTP plugins!

Want to know how clients use your tours? Google Analytics Track Events plugin:

Add actions to your hotspots: Hotspot Actionlist plugin:

User avatar
Kolor Team
Posts: 2802
Likes: 14 posts
Liked in: 130 posts
Joined: Tue Jan 18, 2011 4:05 pm

Re: Bootstrap Top Navbar Issues  [SOLVED]

by bdd » Mon May 29, 2017 9:39 am

Sorry, the "in" django operator is not implemented in the grantlee library used by Panotour 2.5.7 .

Grantlee syntax is a Django like syntax, but it's an old one, and it is a simplified one.

We will see if we can update Grantlee, or if we can add this operator by ourself in a future version .


2 people like this post.

Who is online

Users browsing this forum: No registered users and 0 guests