This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

axomat
axomat

Has anyone used the october popup js file to do popups in the front end? I am going to try and use it but just wondered if anyone had done it already?

dafunkysapiens8485
dafunkysapiens8485

I know, this post is quite old but anyhow I'd like to know if u had any success or experiences here.

It is kind of really hard to understand the whole concept of popups because there are some libraries that do those pretty good. But i started trying and i didn't even come close to a solution to my problem yet.

That's my navigation part:

{% else %}
    <li>
        <a href="#contentBasic"
        id="loginbtn"
        class="btn btn-primary"
        data-toggle="modal"
        data-request-redirect="{{ 'home'|page }}">Login</a>
    </li>
    <li>
        <a href="#contentBasic"
           id="registerbtn"
           class="btn btn-primary"
           data-toggle="modal"
           data-request-redirect="{{ 'home'|page }}">Registieren</a>
    </li>
{% endif %}

That is my default.htm form my layout:

<!-- PLACEHOLDER CONTENT -->
{% partial 'account/default' %}
<!-- / END PLACEHOLDER CONTENT -->

This is my account partial that serves as the default and is included in the layout above:

{% if not user %}
<div id="contentBasic" style="margin-top: 100px" class="control-popup modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            {% set logIn = "account/login" %}
            {% set regIster = "account/register" %}

          <!-- ######################################## -->
          <!-- # Here Should be the dynamically loaded partial #-->
          <!-- #either     {% partial logIn %} #-->
          <!-- #or {% partial regIster %}   #-->
          <!-- ######################################## -->

        </div>
    </div>
</div>
{% else %}
    {% partial 'account/activation_check' %}
    {% partial 'account/update' %}
{% endif %}

Is it possible to change what is loaded in the modal dynamically. If i hit register i want to pop up the register form and if i hit the login i want the login but i can't find a way to load the code inside the partial dynamically on with button is clicked.

Any pointers from u guys?

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.