Keyword

[SOLVED] don't display a specific category view

  • Felipe Abranches
  • Felipe Abranches's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago - 11 years 4 months ago #113482 by Felipe Abranches
[SOLVED] don't display a specific category view was created by Felipe Abranches
Hi,

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.

More
11 years 4 months ago #113483 by Peter Grube
Replied by Peter Grube on topic Re: don't display a specific category view
I am not sure you can, or indeed why you would want to, the content module allows you to not display category link. I tried your link but it doesn't work.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #113484 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: don't display a specific category view
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.

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
  • Felipe Abranches's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113485 by Felipe Abranches
Replied by Felipe Abranches on topic Re: don't display a specific category view
The link don't work because a "comma" (,) was added to it, just delete it.

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
  • Felipe Abranches's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113486 by Felipe Abranches
Replied by Felipe Abranches on topic Re: don't display a specific category view

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #113487 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: don't display a specific category view
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.

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
  • Felipe Abranches's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113488 by Felipe Abranches
Replied by Felipe Abranches on topic Re: don't display a specific category view

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.