Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • rocher Friend
    #1006987

    Hi,

    I want to turn off "Page X of Y" in the pagination for long articles in my JA Magz II template website.

    I’ve found plug-in settings for customising the table of contents etc, but I can’t find a setting to turn off "Page X of Y", which appears at the top of the page.

    I did find an forum post which suggested adding the following code to custom.css:

    / Hide page counter /
    .pagenavcounter {
    display:none;
    }

    I did this and yes it hides the counter, but it leaves the spacing at the top of the page. Other posts have suggested creating an override for pagination.php, by customising the template’s pagination.php.

    However, I can’t find pagination.php for the JA Magz II template. I did find a number of pagination.php files, but I can’t work out which one is used by the template.

    Could you please advise?

    Regards, Robertf

    Pankaj Sharma Moderator
    #1006991

    Hi
    Kindly give me URL of article, I will help you to remove the space or remove it from code.
    Regards

    rocher Friend
    #1007217

    Hi Pankaj,
    As I’m doing the development on a local server, I was setting up the scenario for you in an JA Magz II article on a test server, but I found the custom.css code hid the "Page X of Y" text AND did not leave spacing at the top of the article:

    / Hide page counter /
    .pagenavcounter {
    display:none;
    }

    I went back to the article on my development server and looked at the text via HTML in the editor. I had copied and pasted this article from another website and I found it had

      

    at the top of each page, hence the spacing even when the custom.css code hid "Page X of Y".

    So, thanks for your help, because if you hadn’t asked for the URL of the article and I hadn’t set up the test server article for you, then I wouldn’t have found the answer to my problem. You probably would have for me, but this way I learn better by doing rather than by being shown how to do it! 🙂

    Regards, Robertf

    Pankaj Sharma Moderator
    #1007220

    Hi
    Open /html/com_content/article/default.php file
    Find

    <?php if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && $this->item->paginationrelative) : ?>
        <?php echo $this->item->pagination; ?>
    <?php endif; ?>
    

    And remove it near LINE 68.
    Regards

    rocher Friend
    #1007222

    Thanks Pankaj. Should I remove the code from /html/com_content/article/default.php as you have instructed rather than use the following code in custom.css?

    / Hide page counter /
    .pagenavcounter {
    display:none;
    }

    Regards, Robertf

    Pankaj Sharma Moderator
    #1007226

    Hi
    It’s up to you. You want to remove the code so I suggested the code. Removal code only removes pagination from the top of articles.
    Using CSS it hides the code.
    Regards

    rocher Friend
    #1007229

    Ok, thanks again, Pankaj, I’ll test both. 🙂

    rocher Friend
    #1010370

    Hi Pankaj, I tried removing the following code from templates/my-template/html/com_content/article/default.php file:

    <?php if (!empty($this->item->pagination) && $this->item->pagination && !$this->item->paginationposition && $this->item->paginationrelative) : ?>
    <?php echo $this->item->pagination; ?>
    <?php endif; ?>

    It had no effect, the "Page X of Y" still displayed at the top of the article. There are many default.php files – I wonder if I’m editing the right one for the T3 framework?

    Regards, Robertf

    Pankaj Sharma Moderator
    #1010400

    Hi
    Kindly open JA magz ii template folder. Do not change anything from T3 .
    Regards

    rocher Friend
    #1011137
    This reply has been marked as private.
    Pankaj Sharma Moderator
    #1011139

    Hi
    Kindly revert all custom changes you applied in php files and custom.css file.
    And let me know the exact change that you want.
    You want to show navigation on top and bottom ?
    Or only at bottom?

    rocher Friend
    #1011141

    Hi Pankaj,

    Thanks for your response:

    1. As per my earlier post, all custom changes in default.php and custom.css have been reverted
    2. I don’t want "Page 1 of 4" (as per the first screenshot) to appear anywhere in the article
    3. I’d like the Start/Prev, page no., Next/End page navigation (as per the second screenshot) to appear at the bottom AND top of the article.

    Thanks again for your help with this request.

    Regards, Robertf


    1. Screen-Shot-2017-02-16-at-2.29.47-pm
    2. Screen-Shot-2017-02-16-at-2.32.57-pm
    Pankaj Sharma Moderator
    #1011145

    Hi
    I think there is a misunderstanding in the post. The suggestion is for the navigation buttons next and prev. you can remove that from the article from the top. The pagination is working like default Joomla. And it can not be from default.php. You can only hide the counter by adding below code in custom.css file

    .pagenavcounter {   display: none; }

    If you know the custom work and want to customise pagination.php you can fine it in/html/layout/joomla/content folder

    Regards

    rocher Friend
    #1011148

    Thanks, Pankaj, I’ll use .pagenavcounter { display: none; } in the custom.css to hide the page counter.

    I’ve had a look at /html/layout/joomla/content/pagination.php – I’m not an expert coder, but this seems to be where the page navigation links at the bottom of the article are built. I need to know where this is called when displaying the article, so I can display it at the bottom (as per the screenshot) and at the top of the article.

    Again, I’m not at expert coder, but if you give me the location and name of the php file that displays the article, then I should be able to work out how to copy the page navigation links code from the bottom of the article and paste it to the top (as has been suggested in other Joomla forum topics).

    Regards, Robertf


    1. Screen-Shot-2017-02-16-at-2.29.47-pm-1
    Pankaj Sharma Moderator
    #1011156

    Hi
    Page navigation is not from the template its from Joomla content plugin. In template, there is only one override to for start and
    /HTML/plgcontentnavigation that use only for the next/previous button. i tried to customise it but its require override from core Joomla.
    In template we used default.php as you already saw that for article override.

    You can change the template to default Joomla and see the output will be same. I can only help you to hide the counter here as its custom works task.

    Regards

Viewing 15 posts - 1 through 15 (of 16 total)

This topic contains 15 replies, has 2 voices, and was last updated by  rocher 7 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum