Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOOtheme Pagination (Joomla plugin)

Load more ("Показать ещё") for Custom Articles grids in YOOtheme Pro.

Server-side pagination straight from com_content that:

  • bypasses YOOtheme's limitation (Custom Articles has no built-in pagination and an undocumented item cap);
  • survives template updates — a regular Joomla plugin, not a template hack.

Why

YOOtheme Pro renders articles via the Custom Articles element, but:

  • the built-in Pagination element only works with the Page → Articles source, not Custom Articles;
  • Custom Articles has an item cap that the Limit field cannot exceed.

This plugin fixes it: YOOtheme renders the first N articles, the rest are loaded by an AJAX Load more button, N at a time, down to the oldest article.


Features

  • Server-side pagination straight from the DB (#__content), no page reload.
  • Configurable: category ID, articles per page, order field & direction, menu ItemID.
  • Button text and date language (ru / en) are configurable.
  • Button styled by the theme's UIkit classes (uk-button uk-button-secondary) — no custom CSS.
  • Compatible with Joomla 4 / 5 / 6.

Installation

  1. Download the latest release (plg_content_yootheme_pagination-*.zip) from Releases.
  2. Joomla → System → Install → Extensions → upload the ZIP.
  3. Joomla → Plugins → find YOOtheme Pagination → enable it.
  4. Configure the options (see below).

Options

Option Default Description
Category ID 27 the com_content category ID whose articles are loaded
Articles per page 12 how many to load per click
Order field publish_up sort field (publish date, etc.)
Order direction DESC descending / ascending
Menu ItemID (Blog) 260 the blog menu ItemID, used for correct article links
Load more button text Load more the button label
Date language en month language in the date (en/ru)

Important YOOtheme step

Set Count = 12 (or the same as the plugin's Articles per page) in the Custom Articles source of the main blog grid.

Otherwise YOOtheme outputs all articles at once and nothing is left to load.


How it works

  1. YOOtheme renders the first N cards as usual.
  2. The plugin (onBeforeCompileHead) injects yootheme_pagination.js and passes the options.
  3. The JS finds the card grid (a.uk-card[href^="/blog/"]) and adds the button.
  4. On click, fetch hits com_ajax → the plugin returns JSON with the next batch.
  5. The JS renders the cards into the same grid, keeping YOOtheme's markup.

Debug endpoint:

/index.php?option=com_ajax&plugin=yootheme_pagination&group=content&format=json&offset=12&limit=12

Requirements

  • Joomla 4 / 5 / 6
  • YOOtheme Pro template rendering articles via Custom Articles
  • PHP 8+

Repository structure

├── yootheme_pagination.xml      # plugin manifest + options
├── yootheme_pagination.php      # Ajax endpoint (com_ajax) + SQL
├── media/yootheme_pagination.js # client-side Load more button
├── README.md
└── LICENSE

License

GNU GPL v2.

About

Joomla plugin: "Load more" (AJAX) pagination for YOOtheme Pro Custom Articles grids. Survives template updates.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages