链接在框架中不起作用7


Links not working in Framework7

我正在使用Framework7(http://www.idangero.us/framework7/)开发一个基于Web的应用程序。

做得很好,但现在我已经集成了我的登录/会员系统,我遇到了超链接问题。

我花了几个小时试图弄清楚,但仍然没有。

基本上我有三个链接:

<div class="pages navbar-through toolbar-through">
    <div data-page="index" class="page">
        <div class="page-content">
            <div class="content-block">
                <div class="content-block-inner">
                    Hello <?php echo htmlentities($_SESSION['user']['username'], ENT_QUOTES, 'UTF-8'); ?>, secret content!<br />
                    <a href="memberlist.php">Memberlist</a><br />
                    <a href="edit_account.php">Edit Account</a><br />
                    <a href="logout.php">Logout</a>
                </div>
            </div>
        </div>

Memberlist.phpedit_account.php不起作用,但注销可以。

直接在我的浏览器中访问文件(例如 domain.com/memberlist.php)会加载文件。他们只是不从此页面加载,所以它显然有问题。

我尝试包含target="_self"并使用 Framework7 文档中解释的其他样式的链接内容,但我遇到的问题没有任何内容。

数据页属性值中写入确切的页面名称很重要

<div class="page" data-page="about">

在文档中挖掘了更多内容后,我能够解决我的问题。

在 Framework7 中链接要求链接到的每个页面都有一些特定的代码来解析 AJAX。

 <!-- That is all we have in about.html file -->
<div class="page" data-page="about">
  ... About page content goes here
</div>