- Posts: 16
COMMUNITY FORUM
[SOLVED] don't display a specific category view
- Felipe Abranches
-
Topic Author
- Offline
- New Member
I'm looking for a way for don't display de category view of a specific category.
For exemple, in www.muringa.com.br/index.php, I have de k2_content module displaying the "Agenda" category.
If you click in the title, you go to the Item View.
But if you delete from the URL the "Item" info, and get the link www.muringa.com.br/agenda, you can see the Category View.
That's what I don't want the site to display, specifically this category.
Maybe the best way is editing the "category.php" to redirect to the home page, but I'm accepting others ways.
Thanks!
Please Log in or Create an account to join the conversation.
- Peter Grube
-
- Offline
- Elite Member
- Posts: 241
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Remember you need to put header() before anything renders so you will need to edit your index.php rather than category.php.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Felipe Abranches
-
Topic Author
- Offline
- New Member
- Posts: 16
The problem don't is on the module, the problem is that you can access the category page through the URL.
For this category "Agenda" on this site I need that the visitor see only the "item" view, not the "category" view.
Please Log in or Create an account to join the conversation.
- Felipe Abranches
-
Topic Author
- Offline
- New Member
- Posts: 16
Krikor Boghossian wrote: You can use an .htaccess 301 redirect or you can use PHP's header() function.
Remember you need to put header() before anything renders so you will need to edit your index.php rather than category.php.
Thanks, but I didn't try yours codes, I simply put in the "category.php"
Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Both have the same functionality. You need to develop a K2 plugin to render this code in order to handle these redirects from the backend.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Felipe Abranches
-
Topic Author
- Offline
- New Member
- Posts: 16
Krikor Boghossian wrote: Its the same thing, the one is pure PHP the other one is thought the API.
Both have the same functionality. You need to develop a K2 plugin to render this code in order to handle these redirects from the backend.
That's a great idea, thanks!
Please Log in or Create an account to join the conversation.