Liferay 6.2 CE
How exactly can one go about to set a portlet to show up on the highlighted category on the add application panel? I've been searching for hours, without any luck.
Have tried to define category name as "Highlighted", but it just creates a new one with the same name.
The main goal is just to have my own portlets sit on the top of the rest.
Cheers.
Configure the following settings (here with the defaults) in your portal-ext.properties:
##
## Dockbar Portlet
##
#
# Set the portlet ids that will be shown directly in the "Add Application"
# menu.
#
dockbar.add.portlets=56,101,110,71
Here you see that Liferay has the habit of numbering all the core portlets. Your own portlets ids will be constructed from their plugin name and the portlet id, e.g. the AmazingApp portlet that is deployed in the webapplication my-great-custom-plugins-portlet will have an ID of *amazingapp_WAR_mygreatcustompluginsportlet* (or similar). How can you find this out by yourself? Add it to the page, then choose "Look and Feel" and "Advanced Styling" - this will show the HTML id for your portlet, of which you can easily extract the actual portlet ID to use for portal-ext.properties.
Related
I am migrating from liferay 6.2 to liferay 7 ,here I am getting problem to give the selected list of categories in the form.
Ex:
In the site settings by default we can able to see four different categories and its sub-categories in the form.
which are defined in the portal.properties in the following way
sites.form.update.main=details,categorization,site-url,site-template
sites.form.update.seo=sitemap,robots
sites.form.update.advanced=default-user-associations,staging,analytics,content-sharing,recycle-bin
sites.form.update.miscellaneous=custom-fields,display-settings
1)Basic Information
a)details, b)categorization, c)site-url, d)site-template
2)Search Engine Optimization
a)sitemap, b)robots
3)Advanced
a)default-user-associations, b)staging,analytics, c)content-sharing, d)recycle-bin
4)Miscellaneous
a)custom-fields, b)display-settings
We can include only some specified selected categories based on the role.
In liferay 6.2 we can avhive this by defining in the
portal-ext.properties like the below
#These custom properties are defined for portal admin
sites.form.update.main.admin=details,categorization,site-url,site-template
sites.form.update.seo.admin=sitemap,robots
sites.form.update.advanced.admin=default-user-associations,staging,analytics,content-sharing,recycle-bin
sites.form.update.miscellaneous.admin=custom-fields,display-settings
#These custom properties are defined for portal site admin
sites.form.update.main.siteadmin=details,site-url
sites.form.update.seo.siteadmin=
sites.form.update.advanced.siteadmin=recycle-bin
sites.form.update.miscellaneous.siteadmin=
But How could I achieve the same functionality in Liferay7 ?
I am trying to change the language of portlet title, but didn't succeed!
I went through the various link from liferay's forum, but unable to achieve my task.
Example:1
Example:2
Details:
I am using following locales fr_FR and zh_CN,with the following values in the concerned properties file
javax.portlet.title.1_WAR_microblogsportlet=News
javax.portlet.title.1_WAR_microblogsportlet=nouvelles(for fr_FR)
javax.portlet.title.1_WAR_microblogsportlet=新聞(for zh_CN)
resource bundle is set in portlet.xml as given:
<portlet-name>1</portlet-name>
<display-name>Microblogs</display-name>
<portlet-class>com.liferay.microblogs.microblogs.portlet.MicroblogsPortlet</portlet-class>
<resource-bundle>content.Language</resource-bundle>
You just need to have property with key as "javax.portlet.title", no need to put your portlet ID as part of key.
Name the localized properties files and put property value as below.
Language.properties
javax.portlet.title=News
Language_fr.properties
javax.portlet.title=nouvelles
Language_zh.properties
javax.portlet.title=新聞
Then liferay displays portlet in corresponding language depending on user's locale.
You may test in one of below ways.
For User -
In current user profile -> Display Settings, Select language as French and then visit the page having your portlet. It should display title in french instead of english.
Change in URL
You may also specify locale in page URL as described in liferay 6.1 documentation
http://localhost:8080/fr/<your page url>
Using Language portlet
Add Language portlet on your page and clicking on French flag changes locale to french and the page should display portlet title in French.
I am using 1-2 Columns (70-30) layout for the page in liferay. The problem that I am facing is that I am not able to place them properly in 1-2 columns form even after dragging them properly on the page. I am making use of web content portlets. The portlet that should be placed on '30' side;its data appears the way I want on the RHS but the portlet window covers the entire screen. How should I place the portlets to get the exact 1-2 columns layout?
EDIT:
Is it possible to place a portlet over another portlet?
If the portlets that you are trying to place are custom portlets, It may be worth checking if custom css width property forcing portlet to occupy more width than supposed.
You can't place one portlet over another portlet. But "Nested Portlet" can be used to include more than one portlet in their own layout.
As you don't have public URL, I can only suggest steps to debug your issue.
Login to portal as Administrator.
Create a new page.
Apply liferay default classic theme to the page and apply 70-30 layout.
Add one Web content display portlet instance in column 1 and another in column 2.
Checkpoint: Enable Edit checkbox and see if the default portlet boundaries are occupying width they are supposed to take. If yes, then your liferay default working fine.
Checkpoint: Select your web content article and see if width of display changes. If Yes, then the problem is with with your web content article.
Checkpoint: Apply your theme and then see the issue. Then issue may be with your custom css files in _diff folder.
Use Firebug in Firefox or chrome dom viewer (F12 in chrome window) and observe which CSS style is causing the issue.
I want to do a greetings portlet that will say: Good morning, %username% (Logout). I don't want to place it on dockbar (there is a limit of max characters count per dockbar child and i don't know how to remove that limitation), i want to place it under the dockbar (like in attached picture).
Is it possible? If not - how can i remove limit of max characters in dockbar child?
Using Liferay 6.2.
You can use theme.
You can modify the portal_normal.vm and embed your portlet in theme just like liferay is accessing the dockbar portlet.
Add some custom styles for positioning the portlet and you are good to go.
I have a custom themed orchard site - I am new to Orchard.
All pages have the same header with primary navigation, and footer. I have set header & footer up as Zones.
There are 4 main sections, 2 require a second navigation on the left; Information & FAQ.
I would like to dynamically create pages for those sections in the CMS - and have the page added to the appropriate second navigation menu, then when clicked navigate to that page (showing the correct navigation menu on the left - with the right styling for the rest of the page).
In simple steps what's the best way to do this - and does it need me to edit the Layout or other files in Visual Studio (I can if required).
I have found several articles on this online - but they all apply to completed themes, not one being created from scratch.
(I also don't have this 'map' of the site on the widgets page - how / should I create one somehow?):
Thanks.
As i understood what you are after is creating a Widget. Basically to show any content in your page you must create appropriate ContentType and attach required parts to it , and to display it you must enter url of that content in browser's address bar or click in a link for that content which in either case it will navigate to a new page and will display content inside [Content] Zone. but if you want to display a Content in a special Zone and special pages, Creating a Widget is the way to go.to create a widget the only thing required is to add a WidgetPart to it and give it Stereotype of 'Widget'.you can do this by making following changes in Migration file for your desired ContentType :
ContentDefinitionManager.AlterTypeDefinition("MyType", cfg => cfg
.WithPart("WidgetPart")
.WithPart("CommonPart")
.WithSetting("Stereotype", "Widget"));
this will turn your Content Type into a widget which can be placed in any Zone you want.
to add your widget to a Zone navigate to widgets from dashboard.
and then select the zone which you want to place your widget in :
and then select your widget
and finally select the layer in which your widget will be shown.a layer is set of rules which determine in which pages your widget will be displayed.for example selecting homepage will display your widget only in home page, selecting default will display your widget in all pages and so on.to define your own rule check here.
Edit :
to create new zone in your theme just include the Zone name in theme.txt file then open up Layout.cshtml (one resides in your custom theme's view directory) , and do following :
given your zone name is SecondaryNavigation then add following code inside your theme
#if (Model.SecondaryNavigation != null)
{
<div id="secondary-navigation" class="group">
<div class="inner">
#Zone(Model.SecondaryNavigation)
</div>
</div>
}
with this an additional Zone will be displayed in zone list and then you can put your widget inside your newly created zone.and about that picture you asked about.it is an image file which created by author of the theme and named 'Theme.png' and will displayed as a preview in manage widget screen , you can create it for your own theme and put it in your theme view directory.
EDIT 2
The migration file itself is not important.the only thing which is important is to define a class which drives from DataMigrationImpl , orchar will pick your migration file and run it automatically , migration file has firstly a Create method which returns 1 , and for each further update you must define a method called UpdateFromN in which N is current version your module is in, that will return 2 , 3 , ... what you can do in a migration file is creating database tables , creating ContentTypes , ContentParts , ContentFields , etc. there is already couple of modules shipped with orchard , check them and get the idea.