分页会影响十月厘米导航中的URL

时间:2018-08-02 07:13:32

标签: octobercms

我在此创建的三个模型中以及在通过builderlist打印数据的页面中进行了插件名称设置,但问题是单击next或prev或number然后单击菜单上的另一个链接之后,它仅替换了名称而不是整个url。

Agent.htm:

<div class="col-md-12 tb-input-field-block">
                    {% set records = builderList.records %}
                    {% set displayColumn = builderList.displayColumn %}
                    {% set noRecordsMessage = builderList.noRecordsMessage %}
                    {% set detailsPage = builderList.detailsPage %}
                    {% set detailsKeyColumn = builderList.detailsKeyColumn %}
                    {% set detailsUrlParameter = builderList.detailsUrlParameter %}
                    {% for record in records %}
                    {# Use spaceless tag to remove spaces inside the A tag. #}
                    {% spaceless %}
                    {% for image in record.agentsteps %}
                    <a href="{{ image.path}}">
                        <img src="{{ image.thumb(auto,auto) }}" class="responsive">
                    </a>
                    <br>
                    {% endfor %}
                    <p>{{record.agent_content}}</p>
                    <br>
                    {% endspaceless %}
                    {% else %}
                    <li class="no-data">{{ noRecordsMessage }}</li>
                    {% endfor %}
                    {% if records.lastPage > 1 %}
                    <ul class="pagination">
                        {% if records.currentPage > 1 %}
                        <li><a href="{{ this.page.baseFileName|page({ (pageParam): (records.currentPage-1) }) }}" >&larr; Prev</a></li>
                        {% endif %}
                        {% for page in 1..records.lastPage %}
                        <li class="{{ records.currentPage == page ? 'active' : null }}">
                            <a href="{{ this.page.baseFileName|page({ (pageParam): page }) }}" >{{ page }}</a>
                        </li>
                        {% endfor %}
                        {% if records.lastPage > records.currentPage %}
                        <li><a href="{{ this.page.baseFileName|page({ (pageParam): (records.currentPage+1) }) }}" >Next &rarr;</a></li>
                        {% endif %}
                    </ul>
                    {% endif %}
                </div>

android.htm

<div class="col-md-12 tb-input-field-block">


                {% set records = builderList.records %}
                {% set displayColumn = builderList.displayColumn %}
                {% set noRecordsMessage = builderList.noRecordsMessage %}
                {% set detailsPage = builderList.detailsPage %}
                {% set detailsKeyColumn = builderList.detailsKeyColumn %}
                {% set detailsUrlParameter = builderList.detailsUrlParameter %}

                    {% for record in records %}
                        {# Use spaceless tag to remove spaces inside the A tag. #}
                        {% spaceless %}
                        {% for image in record.androidimages %}

                        <a href="{{ image.path}}">
                            <img src="{{ image.thumb(auto,auto) }}" class="responsive">
                        </a>
                        <br>

                        {% endfor %}
                        {{record.android_content}}
                        <br>
                        {% endspaceless %}
                    {% else %}
                    <li class="no-data">{{ noRecordsMessage }}</li>
                    {% endfor %}

                {% if records.lastPage > 1 %}
                <ul class="pagination">
                    {% if records.currentPage > 1 %}
                    <li><a href="{{ this.page.baseFileName|page({ (pageParam): (records.currentPage-1) }) }}" >&larr; Prev</a></li>
                    {% endif %}

                    {% for page in 1..records.lastPage %}
                    <li class="{{ records.currentPage == page ? 'active' : null }}">
                        <a href="{{ this.page.baseFileName|page({ (pageParam): page }) }}" >{{ page }}</a>
                    </li>
                    {% endfor %}

                    {% if records.lastPage > records.currentPage %}
                    <li><a href="{{ this.page.baseFileName|page({ (pageParam): (records.currentPage+1) }) }}" >Next &rarr;</a></li>
                    {% endif %}
                </ul>
                {% endif %}


            </div>

菜单:

<div>
<ul>
<li><a class="white-font" href="{{'steps/agent'|page}}">Agent Installation</a></li>
                    <li><a class="white-font" href="{{'steps/android'|page}}">Android Steps</a></li>
                    <li><a class="white-font" href="{{'steps/ios'|page}}">IOS Steps</a></li>
                    <li><a class="white-font" href="{{'searchinput'|page}}">Support</a></li>

                    </ul>
                </div>

菜单: menu

点击代理安装后的

URL url after clicking on agent installation

然后点击android步骤,然后网址为 then clicking android steps then url is

backend view

我只使用builderlist并设置每页1条记录,但是当我单击一个链接时,它每页显示1条记录,而当我单击下一个链接时,来自分页div,iT使网址 like :  本地主机/ octoberCMS%20talltapps / install-master / steps / agent / 2

然后我单击另一个链接,然后它使用编号为的页面:  本地主机/ octoberCMS%20talltapps / install-master / steps / android / 2

但是我想当我点击“ ANDROID SETUP”时,网址必须是 like

localhost / octoberCMS%20talltapps / install-master / steps / android

0 个答案:

没有答案