First, you can't get rid of /-/ without really hacking into Liferay which you don't want to do (it will cause much more problems than benefits). All you can get rid off is one "blogs", ending with URL like /web/standorman/-/blogs/application-development-in-liferay
- which seems close enough for me.
Here's how you can use https://github.com/DevJonny/Liferay-6-Friendlier-Friendly-URL-Mapper/ suggested by yannicuLar to do that.
His suggestion doesn't work for you just like that because you're trying to change an out-of-the-box Liferay portlet that's embedded in Liferay itself. To change things like that one has to use an EXT plugin. So this is exactly what you should do.
Step 1 - create an EXT plugin in Plugins SDK (by running create.bat or create.sh in plugins SDK "ext" subfolder).
Step 2 - go inside created ext plugin folder, in /docroot/WEB-INF/ext-impl/src
delete file portal-ext.properties
, and instead put this file - https://github.com/DevJonny/Liferay-6-Friendlier-Friendly-URL-Mapper/blob/master/docroot/WEB-INF/src/com/mysmallcornerstudios/friendlierurlmapping/portlet/FriendlierFriendlyURLMapper.java into it to have it at path
/docroot/WEB-INF/ext-impl/src/com/mysmallcornerstudios/friendlierurlmapping/portlet/FriendlierFriendlyURLMappe r.java
Step 3 - open file docroot/WEB-INF/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml
Fill it with content like this:
<?xml version="1.0"?>
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.1.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_1_0.dtd">
<liferay-portlet-app>
<portlet>
<portlet-name>33</portlet-name>
<icon>/html/icons/blogs.png</icon>
<struts-path>blogs</struts-path>
<configuration-action-class>com.liferay.portlet.blogs.action.ConfigurationActionImpl</configuration-action-class>
<indexer-class>com.liferay.portlet.blogs.util.BlogsIndexer</indexer-class>
<open-search-class>com.liferay.portlet.blogs.util.BlogsOpenSearchImpl</open-search-class>
<scheduler-entry>
<scheduler-event-listener-class>com.liferay.portlet.blogs.messaging.CheckEntryMessageListener</scheduler-event-listener-class>
<trigger>
<simple>
<property-key>blogs.entry.check.interval</property-key>
<time-unit>minute</time-unit>
</simple>
</trigger>
</scheduler-entry>
<scheduler-entry>
<scheduler-event-listener-class>com.liferay.portlet.blogs.messaging.LinkbackMessageListener</scheduler-event-listener-class>
<trigger>
<simple>
<property-key>blogs.linkback.job.interval</property-key>
<time-unit>minute</time-unit>
</simple>
</trigger>
</scheduler-entry>
<friendly-url-mapper-class>com.mysmallcornerstudios.friendlierurlmapping.portlet.FriendlierFriendlyURLMapper</friendly-url-mapper-class>
<friendly-url-mapping>blogs</friendly-url-mapping>
<friendly-url-routes>com/liferay/portlet/blogs/blogs-friendly-url-routes.xml</friendly-url-routes>
<preferences-unique-per-layout>false</preferences-unique-per-layout>
<preferences-owned-by-group>true</preferences-owned-by-group>
<use-default-template>false</use-default-template>
<scopeable>true</scopeable>
<private-request-attributes>false</private-request-attributes>
<private-session-attributes>false</private-session-attributes>
<render-weight>50</render-weight>
<header-portlet-css>/html/portlet/blogs/css/main.css</header-portlet-css>
<css-class-wrapper>portlet-blogs</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>
</liferay-portlet-app>
This content is correct for my version of Liferay. For your version you might need to do this to generate similar content:
- Inside your Liferay distribution find file liferay-portlet.xml (should be in webapps/ROOT/WEB-INF for Tomcat-bundled distro, but maybe in different location for other distress - just search for it)
- Inside that file find
<portlet>...</portlet>
part that has <portlet-name>33</portlet-name>
in it
- Copy the whole part inside
<liferay-portlet-app><!-- copied text goes here --></liferay-portlet-app>
to mentioned above file docroot/WEB-INF/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml
inside your EXT plugin.
- Replace line
<friendly-url-mapper-class>...</friendly-url-mapper-class>
with <friendly-url-mapper-class>com.mysmallcornerstudios.friendlierurlmapping.portlet.FriendlierFriendlyURLMapper</friendly-url-mapper-class>
- Remove lines
``
<portlet-data-handler-class>com.liferay.portlet.blogs.lar.BlogsPortletDataHandlerImpl</portlet-data-handler-class>
<social-activity-interpreter-class>com.liferay.portlet.blogs.social.BlogsActivityInterpreter</social-activity-interpreter-class>
<xml-rpc-method-class>com.liferay.portlet.blogs.util.PingbackMethodImpl</xml-rpc-method-class>
<asset-renderer-factory>com.liferay.portlet.blogs.asset.BlogsEntryAssetRendererFactory</asset-renderer-factory>
<atom-collection-adapter>com.liferay.portlet.blogs.atom.BlogsEntryAtomCollectionAdapter</atom-collection-adapter>
<custom-attributes-display>com.liferay.portlet.blogs.BlogsEntryCustomAttributesDisplay</custom-attributes-display>
<workflow-handler>com.liferay.portlet.blogs.workflow.BlogsEntryWorkflowHandler</workflow-handler>
Step 4 - deploy your ext plugin (run ant inside it's folder to build it, go up to subfolder "dist" in Plugins SDK, find .war file for your plugin - deploy that .war file into Liferay by copying it to "deploy" folder inside Liferay distrib) and restart Liferay.
That should do it.