Jump to content

OCFilter v4.7.5 (фильтр или сортировку в SEO Страницах)


mrAcula
 Share

Recommended Posts

Здравствуйте, уважаемые!
Подскажите, как сделать фильтр или сортировку в SEO Страницах OCFilter v4.7.5
Когда страниц стало больше 20, уже не очень удобно работать.
Может есть какой модуль? или способ как это реализовать?

Link to comment
Share on other sites

Попробуй так 

<?xml version="1.0" encoding="utf-8"?>
<modification>
  <name>OCFilter_search</name>
  <code>OCFilter_search</code>
  <version>1.1</version>
  <author>OCFilter_search</author>
  <link>OCFilter_search</link>
  <file path="admin/model/extension/ocfilter_page.php">
	<operation>
      <search><![CDATA[public function getTotalPages() {]]></search>
      <add position="replace"><![CDATA[
        public function getTotalPages($data = array()) {
]]></add>
	  </operation>
	<operation>
	  <search><![CDATA[$sql .= " AND LCASE(opd.title) LIKE '" . $this->db->escape(utf8_strtolower($data['filter_title'])). "%'";]]></search>
	  <add position="replace"><![CDATA[
      $sql .= " AND LCASE(opd.title) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_title'])). "%'";
]]></add>
	</operation>
  </file>
  <file path="admin/view/template/extension/module/ocfilter_page_list.twig">
    <operation>
        <search><![CDATA[<div class="panel-body">]]></search>
        <add position="after"><![CDATA[
          <!--OCF search -->
          <fieldset>
            <legend>Введите название страницы</legend>
            <div class="well">
              <div class="input-group">
                <input type="text" name="filter_title" value="{{ filter_title }}" placeholder="Введите название" id="input-name" class="form-control" />
                <span class="btn input-group-addon"><i class="fa fa-filter"></i> Фильтр</span>
              </div>
            </div>
          </fieldset>
          <legend>Посадочные страницы фильтра</legend>
  ]]></add>
      </operation>
    <operation>
        <search><![CDATA[{{ footer }}]]></search>
        <add position="before"><![CDATA[
          <!--OCF search -->
          <script><!--
            $('.input-group-addon').on('click', function() {
             	var url = 'index.php?route=extension/module/ocfilter/page&user_token={{ user_token }}';
             	var filter_title = $('input[name=\'filter_title\']').val();
             	if (filter_title) {
             		url += '&filter_title=' + encodeURIComponent(filter_title);
             	}
             	location = url;
             });
        $('input[name=\'filter_title\']').on('keydown', function(e) {
                if (e.keyCode == 13) {
                    $('.input-group-addon').trigger('click');
                }
            });
        //--></script>
  ]]></add>
      </operation>
  </file>
</modification>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...