Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Elxis documentation
for users and developers.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Can't view page 2 of menu item collection
« previous
next »
Print
Pages: [
1
]
Author
Topic: Can't view page 2 of menu item collection (Read 175 times)
seadhna
Hero Member
Posts: 513
Can't view page 2 of menu item collection
«
on:
January 15, 2025, 09:53:23 »
Hi there,
I have a menu item collection (called 'other') which has more than 1000 menu items.
The listing at: ../emenu/mitems/other.html gets paginated after 1000 items.
However, if I try to click on page 2 in the pagination, I get taken to: ../emenu/?page=2
which displays a list of all menu item collections. I can't seem to view page 2 of menu item collection "other".
Logged
datahell
Elxis Team
Hero Member
Posts: 10374
Re: Can't view page 2 of menu item collection
«
Reply #1 on:
January 16, 2025, 21:12:23 »
I am sorry, you have created a menu with 1000 items?
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
seadhna
Hero Member
Posts: 513
Re: Can't view page 2 of menu item collection
«
Reply #2 on:
January 17, 2025, 14:20:55 »
yes, over many years, in order to apply modules to articles. all the articles need to be in the same category, but require different modules.
Logged
datahell
Elxis Team
Hero Member
Posts: 10374
Re: Can't view page 2 of menu item collection
«
Reply #3 on:
January 17, 2025, 20:14:54 »
I am sure you have done it the wrong way. There are better ways of doing so rather than creating 1000 menu items.
You can, for example, put a little code inside your template to load specific modules with custom criteria.
Individual modules can be loaded with the
module
method of
elxisDocument
library. You can either provide the module name or the module ID. In case you have multiple instances of the same module it is better to use the module ID.
Generic usage
$eDoc = eFactory::getDocument();
$eDoc->module('mod_login');
or
$eDoc->module('24');
Example of dynamic module loading depending on the current article.
We check if
ELXIS_ARTID
php constant has been defined. If yes the visitor sees an article. We get its ID and then based on this ID we load the corresponding module.
if (defined('ELXIS_ARTID')) {
switch (ELXIS_ARTID) {
case 4: $modid = '12'; break;
case 5: $modid = '22'; break;
case 19: $modid = '15'; break;
case 6: $modid = '11'; break;
case 35: $modid = '23'; break;
case 19: $modid = '8'; break;
default: $modid = ''; break;
}
if ($modid != '') {
$eDoc->module($modid);
}
}
You can pass these IDs are parameters in your template's XML.
If you have too many you can use a compact form like that: 4=12,5=22,19=15,...
You can also make it even easier by adding advanced functionality in your template to manage them from Elxis administration easily (like a table)
«
Last Edit: January 17, 2025, 20:20:12 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Can't view page 2 of menu item collection