I'm looking for a way to display all information pages, with the most recent shown first. Preferably with an option to exclude certain pages. Sort of like a blog main page with pagination, but for information pages only. I do not want to use a blog module for various reasons. The most important reason being that I would have to manage information and blog pages in separate menus. I'd like to keep pages of all kinds in one place, and already got an extension installed for separating information pages by category.
Did anybody by any chance already create an extension for this?
Custom work is not an option, or at least not for now.
OC 3.0.3.2
Default theme
Unidentified extension. Custom work is not an option.EMGX wrote: ↑Mon Sep 27, 2021 6:31 pmI'm looking for a way to display all information pages, with the most recent shown first. Preferably with an option to exclude certain pages. Sort of like a blog main page with pagination, but for information pages only. I do not want to use a blog module for various reasons. The most important reason being that I would have to manage information and blog pages in separate menus. I'd like to keep pages of all kinds in one place, and already got an extension installed for separating information pages by category.
Did anybody by any chance already create an extension for this?
Custom work is not an option, or at least not for now.
OC 3.0.3.2
Default theme
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
They're already ordered by sort_order so just use that to order them by date:
Code: Select all
/catalog/model/catalog/information.php
Code: Select all
public function getInformations() {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC");
return $query->rows;
}
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: No registered users and 47 guests