Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Joseph Wolfe
Remove search form from Blog portlet
29. November 2011 11:17
Antwort

Joseph Wolfe

Rang: Regular Member

Nachrichten: 103

Eintrittsdatum: 22. Februar 2011

Neue Beiträge

As the title of the thread states....I am in need to remove the search form from the Blogs portlet. How would this be accomplished.
Much obliged.
Nagendra Kumar Busam
RE: Remove search form from Blog portlet
29. November 2011 12:57
Antwort

Nagendra Kumar Busam

Rang: Liferay Master

Nachrichten: 638

Eintrittsdatum: 7. Juli 2009

Neue Beiträge

I didn't try this BUT it might help you.

By default blogs protlet will try to render view.jsp which inturn calls view_entries.jspf.

In view_entries.jspf you will have if condition like below


1showSearch = showSearch && !results.isEmpty();


You change it to

1showSearch = false;


It should work for the functionality you are looking for. You can do this change through hooks

HTH
- Nagendra Kumar
Jelmer Kuperus
RE: Remove search form from Blog portlet
29. November 2011 14:10
Antwort

Jelmer Kuperus

Rang: Liferay Legend

Nachrichten: 1192

Eintrittsdatum: 10. März 2010

Neue Beiträge

The easiest would be to create a hook for /html/portlet/blogs/init-ext.jsp and add a single line

1<% showSearch = false; %>


That would make it easier to later upgrade to a new liferay version than when you would hook view.jsp
Nagendra Kumar Busam
RE: Remove search form from Blog portlet
30. November 2011 06:49
Antwort

Nagendra Kumar Busam

Rang: Liferay Master

Nachrichten: 638

Eintrittsdatum: 7. Juli 2009

Neue Beiträge

Thank you Jelmer, it's the simple one & appropriate answer. Overlooked didn't saw init-ext.jsp file emoticon
Joseph Wolfe
RE: Remove search form from Blog portlet
14. Dezember 2011 08:10
Antwort

Joseph Wolfe

Rang: Regular Member

Nachrichten: 103

Eintrittsdatum: 22. Februar 2011

Neue Beiträge

Ah yes... an easy one that I missed.........
thanks
Joseph Wolfe
RE: Remove search form from Blog portlet
10. Januar 2012 09:19
Antwort

Joseph Wolfe

Rang: Regular Member

Nachrichten: 103

Eintrittsdatum: 22. Februar 2011

Neue Beiträge

Taking this a step further, how would we remove the capability to add the blog to the Blinklist, Furl, Newsvine ..etc......I need to have all of the removed. Anyone successfully done that via a hook or mod to the jsp?