-
AuthorPosts
-
rocher Friend
rocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
January 31, 2017 at 10:31 am #1006987Hi,
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 ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
January 31, 2017 at 10:43 am #1006991Hi
Kindly give me URL of article, I will help you to remove the space or remove it from code.
Regardsrocher Friendrocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
February 1, 2017 at 4:29 am #1007217Hi 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 ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
February 1, 2017 at 5:04 am #1007220Hi
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.
Regardsrocher Friendrocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
February 1, 2017 at 5:12 am #1007222Thanks 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 ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
February 1, 2017 at 5:23 am #1007226Hi
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.
Regardsrocher Friendrocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
February 1, 2017 at 5:34 am #1007229Ok, thanks again, Pankaj, I’ll test both. 🙂
rocher Friendrocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
February 14, 2017 at 6:18 am #1010370Hi 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 ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
February 14, 2017 at 7:10 am #1010400Hi
Kindly open JA magz ii template folder. Do not change anything from T3 .
Regardsrocher Friendrocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
February 16, 2017 at 3:07 am #1011137This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
February 16, 2017 at 3:18 am #1011139Hi
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 Friendrocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
February 16, 2017 at 3:35 am #1011141Hi Pankaj,
Thanks for your response:
- As per my earlier post, all custom changes in default.php and custom.css have been reverted
- I don’t want "Page 1 of 4" (as per the first screenshot) to appear anywhere in the article
- 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
-
Pankaj Sharma Moderator
Pankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
February 16, 2017 at 4:05 am #1011145Hi
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 Friendrocher
- Join date:
- August 2008
- Posts:
- 91
- Downloads:
- 9
- Uploads:
- 16
- Thanks:
- 15
- Thanked:
- 3 times in 3 posts
February 16, 2017 at 4:20 am #1011148Thanks, 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
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
February 16, 2017 at 4:53 am #1011156Hi
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
AuthorPostsThis topic contains 15 replies, has 2 voices, and was last updated by rocher 7 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum