Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with pagination with Bootstrap 4 templates (xSwatch4 theme) #1139

Open
alain01 opened this issue Dec 20, 2021 · 7 comments
Open

Problem with pagination with Bootstrap 4 templates (xSwatch4 theme) #1139

alain01 opened this issue Dec 20, 2021 · 7 comments

Comments

@alain01
Copy link
Contributor

alain01 commented Dec 20, 2021

Hi,
This issue is for discussion on the way to solve the problem.
Different solution, different ways...

1 - The problem

Capture d’écran 2021-12-20 102056

No problem with default theme or xbootstrap (bt3 theme) :
Capture d’écran 2021-12-20 104627
Capture d’écran 2021-12-20 104958

2 - The code

File /class/pagnav.php, function public function renderNav($offset = 4)
line 89 and 93
$ret .= '... ';
This text doesnt' use class.!

3a - Solution A

New function on pagnav.php,
for example, renderNavBT
Then I can add a new class like:
$ret .= '<span class="xo-nocounterpage>"...';

Then I add a class in the /themes/xswatch4/style.css to solve the problem with a margin space in the x axe.

3b - Solution B

I add this class directly on the renderNav original function.
This class is not defined by default in xoops so, for bt3 or default theme, it would be ok
BUT
we are not safe from a side effect if webmasters have defined this class in their custom css file

3c - Solution C

May be the css file for Xswatch 4 would be reworked ?
If Yes, I should investigate on it...

3d - Other solution ?

Please, thank you for suggesting !

4 - New cosmetic design

It would be anither subject but it concerns the navigation page

I hate that the navigation page moves depending the position of the page.
I hate that the buttons "«" and "»" disappear.
Capture d’écran 2021-12-20 122149
Capture d’écran 2021-12-20 122215
Capture d’écran 2021-12-20 122229
I like when the navigation page uses a fixed width and the position of each element doesn't move,
Fixed is:
Capture d’écran 2021-12-20 122219
I want Same width for all buttons, so no strong, no parenthesis

So I can add a new function called renderNavEqualBT for that.
What do you think about that

Finally I'm not a developper so, may be there is some trouble that I dont think if I modify or add new function in the class xoops file.
I need your opinion, suggestion before I will work for that.

Alain

@alain01 alain01 changed the title Problem with pagination with Boostrap 4 templates (xSwatch4 theme) Problem with pagination with Bootstrap 4 templates (xSwatch4 theme) Dec 20, 2021
@geekwright
Copy link
Contributor

I thought problems like this are why system_pagenav.tpl was introduced?

@alain01
Copy link
Contributor Author

alain01 commented Dec 20, 2021

In the module Tag, in the /view.tag.php
There is (l185)

if (!empty($start) || count($items_data) >= $limit) {
    $count_item = $tagHandler->getItemCount($tagid, $modid, $catid); // Tag, modid, catid
    require_once $GLOBALS['xoops']->path('/class/pagenav.php');
    $nav     = new \XoopsPageNav($count_item, $limit, $start, 'start', "tag={$tagid}&amp;catid={$catid}");
    $pagenav = $nav->renderNav(4);
} else {
    $pagenav = '';
}

@alain01
Copy link
Contributor Author

alain01 commented Dec 20, 2021

3e - A solution (not the best) without modify the /class/pagnav.php

in the file /style.css, in xswatch4 theme :

#xo-pagenav{ display: inline-block;text-align:left }
become
#xo-pagenav{ display: flex;text-align:left }

and

/* in-active */
#xo-pagenav a.xo-counterpage {margin-right: -9px;background-color: #f8f8f8;color: #999999;border: 1px solid #dfdfdf;} 

become

/* in-active */
#xo-pagenav a.xo-counterpage {margin-right: -9px;background-color: #f8f8f8;color: #999999;border: 1px solid #dfdfdf;
margin: 0 0;
;} 

Capture d’écran 2021-12-21 000235

It seems it works but not very fine, no ?

@geekwright
Copy link
Contributor

geekwright commented Mar 27, 2022

To restate my question, there exists a htdocs/modules/system/templates/system_pagenav.tpl template that can be overridden in every theme (In fact it is.)

What additional information needs to be assigned for the templates for you to be able to make it do what you want?

@mambax7
Copy link
Collaborator

mambax7 commented Nov 4, 2023

@alain01 Is it still an issue? If not, could you close it?

@alain01
Copy link
Contributor Author

alain01 commented Nov 5, 2023

Waouuu, old subject.
So I need to test again.

@mambax7
Copy link
Collaborator

mambax7 commented Nov 24, 2023

@alain01 Any updates from your testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants