mrAcula Posted January 17, 2025 at 05:03 AM Share Posted January 17, 2025 at 05:03 AM Здравствуйте, уважаемые!Подскажите, как сделать фильтр или сортировку в SEO Страницах OCFilter v4.7.5Когда страниц стало больше 20, уже не очень удобно работать.Может есть какой модуль? или способ как это реализовать? 0 Quote Link to comment Share on other sites More sharing options...
bigo Posted January 24, 2025 at 09:36 PM Share Posted January 24, 2025 at 09:36 PM Попробуй так <?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> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.