CTRL +鼠标单击未在新选项卡中打开 [英] CTRL + Mouse click is not opening in new tab

查看:73
本文介绍了CTRL +鼠标单击未在新选项卡中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在magento网站上安装了主题.....

we installed theme to our magento site.....

在该主题中,有一个功能,在列表页面中,有一个分页.

in that theme, there is a feature, in listings page, there is a pagination.

http://i.stack.imgur.com/TxA4E.png

一旦我们点击了这些页面[CTRL +鼠标单击],就会在新标签页中打开它.

once we click on that pages[ CTRL + Mouse click] its opening in new tab.

请完全向下滚动以下链接.

please scroll down fully last for below links.

工作

但是我们做了很多代码修改后,现在此功能不起作用了.

but after we done lot of code chnages, now this feature is not working.

不起作用

有什么办法可以找到问题所在.

is there any way we can find what is the problem.

frontend/base/default/template/page/html/pager.html

<?php if($this->getCollection()->getSize()): ?>

    <?php if($this->getUseContainer()): ?>
    <div class="pager">
    <?php endif ?>

    <?php if($this->getShowAmounts()): ?>
    <p class="amount">
        <?php if($this->getLastPageNum()>1): ?>
            <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
        <?php else: ?>
            <strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
        <?php endif; ?>
    </p>
    <?php endif ?>

    <?php if($this->getShowPerPage()): ?>
    <div class="limiter">
        <label><?php echo $this->__('Show') ?></label>
        <select onchange="setLocation(this.value)">
        <?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
            <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
                <?php echo $_limit ?>
            </option>
        <?php endforeach; ?>
        </select> <?php echo $this->__('per page') ?>
    </div>
    <?php endif ?>

    <?php if($this->getLastPageNum()>1): ?>
    <div class="pages">
        <strong><?php echo $this->__('Page:') ?></strong>
        <ol>
        <?php if (!$this->isFirstPage()): ?>
            <li>
                <a class="previous<?php if(!$this->getAnchorTextForPrevious()): ?> i-previous<?php endif;?>" href="<?php echo $this->getPreviousPageUrl() ?>" title="<?php echo $this->__('Previous') ?>">
                    <?php if(!$this->getAnchorTextForPrevious()): ?>
                        <img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="<?php echo $this->__('Previous') ?>" class="v-middle" />
                    <?php else: ?>
                        <?php echo $this->getAnchorTextForPrevious() ?>
                    <?php endif;?>
                </a>
            </li>
        <?php endif;?>

        <?php if ($this->canShowFirst()): ?>
            <li><a class="first" href="<?php echo $this->getFirstPageUrl() ?>">1</a></li>
        <?php endif;?>

        <?php if ($this->canShowPreviousJump()): ?>
            <li><a class="previous_jump" title="" href="<?php echo $this->getPreviousJumpUrl() ?>">...</a></li>
        <?php endif;?>

        <?php foreach ($this->getFramePages() as $_page): ?>
            <?php if ($this->isPageCurrent($_page)): ?>
                <li class="current"><?php echo $_page ?></li>
            <?php else: ?>
                <li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
            <?php endif;?>
        <?php endforeach;?>


        <?php if ($this->canShowNextJump()): ?>
            <li><a class="next_jump" title="" href="<?php echo $this->getNextJumpUrl() ?>">...</a></li>
        <?php endif;?>

        <?php if ($this->canShowLast()): ?>
          <li><a class="last" href="<?php echo $this->getLastPageUrl() ?>"><?php echo $this->getLastPageNum() ?></a></li>
        <?php endif;?>

        <?php if (!$this->isLastPage()): ?>
            <li>
                <a class="next<?php if(!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" href="<?php echo $this->getNextPageUrl() ?>" title="<?php echo $this->__('Next') ?>">
                    <?php if(!$this->getAnchorTextForNext()): ?>
                        <img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="<?php echo $this->__('Next') ?>" class="v-middle" />
                    <?php else: ?>
                        <?php echo $this->getAnchorTextForNext() ?>
                    <?php endif;?>
                </a>
            </li>
        <?php endif;?>
        </ol>

    </div>
    <?php endif; ?>

    <?php if($this->getUseContainer()): ?>
    </div>
    <?php endif ?>

<?php endif ?>

推荐答案

在文件中替换下面的代码

Replace below code in your file

?php if($ this-> getCollection()-> getSize()):?>

?php if($this->getCollection()->getSize()): ?>

<?php if($this->getUseContainer()): ?>
<div class="pager">
<?php endif ?>

<?php if($this->getShowAmounts()): ?>
<p class="amount">
    <?php if($this->getLastPageNum()>1): ?>
        <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
    <?php else: ?>
        <strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
    <?php endif; ?>
</p>
<?php endif ?>

<?php if($this->getShowPerPage()): ?>
<div class="limiter">
    <label><?php echo $this->__('Show') ?></label>
    <select onchange="setLocation(this.value)">
    <?php foreach ($this->getAvailableLimit() as  $_key=>$_limit): ?>
        <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
            <?php echo $_limit ?>
        </option>
    <?php endforeach; ?>
    </select> <?php echo $this->__('per page') ?>
</div>
<?php endif ?>

<?php if($this->getLastPageNum()>1): ?>
<div class="pages">
    <strong><?php echo $this->__('Page:') ?></strong>
    <ol>
    <?php if (!$this->isFirstPage()): ?>
        <li>
            <a target="_blank" class="previous<?php if(!$this->getAnchorTextForPrevious()): ?> i-previous<?php endif;?>" href="<?php echo $this->getPreviousPageUrl() ?>" title="<?php echo $this->__('Previous') ?>">
                <?php if(!$this->getAnchorTextForPrevious()): ?>
                    <img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="<?php echo $this->__('Previous') ?>" class="v-middle" />
                <?php else: ?>
                    <?php echo $this->getAnchorTextForPrevious() ?>
                <?php endif;?>
            </a>
        </li>
    <?php endif;?>

    <?php if ($this->canShowFirst()): ?>
        <li><a target="_blank" class="first" href="<?php echo $this->getFirstPageUrl() ?>">1</a></li>
    <?php endif;?>

    <?php if ($this->canShowPreviousJump()): ?>
        <li><a target="_blank" class="previous_jump" title="" href="<?php echo $this->getPreviousJumpUrl() ?>">...</a></li>
    <?php endif;?>

    <?php foreach ($this->getFramePages() as $_page): ?>
        <?php if ($this->isPageCurrent($_page)): ?>
            <li class="current"><?php echo $_page ?></li>
        <?php else: ?>
            <li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
        <?php endif;?>
    <?php endforeach;?>


    <?php if ($this->canShowNextJump()): ?>
        <li><a target="_blank" class="next_jump" title="" href="<?php echo $this->getNextJumpUrl() ?>">...</a></li>
    <?php endif;?>

    <?php if ($this->canShowLast()): ?>
      <li><a target="_blank" class="last" href="<?php echo $this->getLastPageUrl() ?>"><?php echo $this->getLastPageNum() ?></a></li>
    <?php endif;?>

    <?php if (!$this->isLastPage()): ?>
        <li>
            <a target="_blank" class="next<?php if(!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" href="<?php echo $this->getNextPageUrl() ?>" title="<?php echo $this->__('Next') ?>">
                <?php if(!$this->getAnchorTextForNext()): ?>
                    <img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="<?php echo $this->__('Next') ?>" class="v-middle" />
                <?php else: ?>
                    <?php echo $this->getAnchorTextForNext() ?>
                <?php endif;?>
            </a>
        </li>
    <?php endif;?>
    </ol>

</div>
<?php endif; ?>

<?php if($this->getUseContainer()): ?>
</div>
<?php endif ?>

这篇关于CTRL +鼠标单击未在新选项卡中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆