Fórum

Liferay 6: Customizing the default page of Liferay

Ravi Kiran, modificado 11 Anos atrás.

Liferay 6: Customizing the default page of Liferay

Junior Member Postagens: 98 Data de Entrada: 12/12/11 Postagens Recentes
Hi ,

I am using Liferay 6 for the portal Application development .

I have a default Liferay Portal Page ( Default Liferay Icon on top left )

My requirement is that , i need to remove the LIFERAY Icon , and in that space need to display a MenuBar (which will be common to all the Portlets on that page ) , The Menubar will look like



I have already created my custom Theme , now please tell me where exactly i need to modify , so that i can place the Menu Bar at the specified position .


If there is confusion in understanding my requirements , please see this Forumula 1 webSite (Where there is a MenuBar shown on top of the page )

http://www.formula1.com/

Thanks in advance .
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Ravi Kiran, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Junior Member Postagens: 98 Data de Entrada: 12/12/11 Postagens Recentes
Thanks , to remove the header part .
I have created a custom theme and under _diffs created all the folders like like css , templates , js , images .
I am removing this part <header id="banner" role="banner"> under portal_normal.vm file in templates folder , and once i run the build.xml file to deploy , but surpringly once its deployed , the header section appears again inside the portal_normal.vm file in templates folder ( And in the UI part the Liferay icon is still present (I am using Liferay 6.0.1)
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Just because you deploy the theme doesn't mean it's been applied to the page.

Log in as admin, go to the manage->page menu option, choose 'look n feel' and select your theme from the list.
Ravi Kiran, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Junior Member Postagens: 98 Data de Entrada: 12/12/11 Postagens Recentes
Hi ,

Thanks for the prompt reply , i have two questions here

1. Why the deleted part (that is the header section )is still being shown in under D:\LiferayJuly03\themes\integrating-stuff-theme\docroot\templates

2.Do i need to learn velocity language also to place the menu bar under in portal_normal.vm file under header section ??

Please see the image , i did for the removal of the liferay logo

Ravi Kiran, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Junior Member Postagens: 98 Data de Entrada: 12/12/11 Postagens Recentes
Hi ,


I have created one more theme , and in that deletion of header section is fine and once its deplyed the Liferay icon is alos not visible uner UI .
But Could anybody tell me how can i place the MenuBar under the portal_normal.vm file ??

Now this is how it looks

thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
All you really need to learn is how the existing themes are constructed.

portal_normal.vm is used for the full page layout. navigation.vm is responsible for the menu bar. build.xml is where you specify the parent theme. _diffs is where you put your changes so that, when a build of the theme is done, your changes are not overwritten and are merged in correctly.
Ravi Kiran, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Junior Member Postagens: 98 Data de Entrada: 12/12/11 Postagens Recentes
Thanks David for the reply , but sorry that i couldn't really followed you .

I have one query with respect to the menu bar code under navigation.vm file




I have got this MenuBar code in JavaScript and css

<html>
<head>

<title>Menu Bar Using CSS</title>

<style>
.menu ul
{
list-style: none;
}

.menu ul li
{
display: inline;
}

.menu ul li a
{
/*Increase Clickable Area*/
padding: 8px;
padding-left: 15px;
padding-right: 15px;

/*Remove the Underline for the Link*/
text-decoration: none;

color: #000;
background: #ccc;
}

/*On Mouse Over the Link*/
.menu ul li a:hover
{
color: #fff;
background: #000;
}
</style>

</head>

<body>
<div class="menu">

<ul>

<li><a href="#">Item 1</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 3</a></li>
<li><a href="#">Item 4</a></li>

</ul>
</div>
</body>
</html>


I put all these code under the navigation.vm file under my Applied Custom Theme . but it didn't worked ( I mean the Menu Bar is not shown on the Portal page )

Please let me know if i am doing anything wrong
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Perhaps you should read up on creating a theme, then, because your stuff is just plain wrong.

Take a look at the navigation.vm file from the classic theme. There is no embedded css, there is no embedded javascript, etc. It is merely using the created pages to display the appropriate menu options.

In your scenario, I would create all of the named pages on the welcome page. Since you want to style some of them differently, you would either need to hard-code the page names in the navigation.vm to identify which ones need the additional style, but I'd probably lean towards some string identifier in the page title (i.e. create the page "Video-red" and in the navigation.vm I'd identify pages that have "-red" as the title, strip it off of the page name for presentation purposes, then add a style class to the <a /> tag, which you can then handle in the custom.css file).

My original point was that before you can go running off creating a theme, you really have to understand what a Liferay theme is, what the various files are (separate css, js, and velocity templates) and get a thorough understanding of them.

After you know how they work, the kind of changes that you're looking to make are really quite easy. Your problem is you haven't done any of that legwork, so of course everything you try (based on normal theming experience) is going to fail miserably when attempted in a Liferay theme.
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Ravi Kiran:
Thanks David for the reply , but sorry that i couldn't really followed you .

I have one query with respect to the menu bar code under navigation.vm file




I have got this MenuBar code in JavaScript and css

<html>
<head>

<title>Menu Bar Using CSS</title>

<style>
.menu ul
{
list-style: none;
}

.menu ul li
{
display: inline;
}

.menu ul li a
{
/*Increase Clickable Area*/
padding: 8px;
padding-left: 15px;
padding-right: 15px;

/*Remove the Underline for the Link*/
text-decoration: none;

color: #000;
background: #ccc;
}

/*On Mouse Over the Link*/
.menu ul li a:hover
{
color: #fff;
background: #000;
}
</style>

</head>

<body>
<div class="menu">

<ul>

<li><a href="#">Item 1</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Item 3</a></li>
<li><a href="#">Item 4</a></li>

</ul>
</div>
</body>
</html>


I put all these code under the navigation.vm file under my Applied Custom Theme . but it didn't worked ( I mean the Menu Bar is not shown on the Portal page )

Please let me know if i am doing anything wrong



As David mentioned check build.xml. In that Plz check have you mentioned the line that was marked bold as below :-

<?xml version="1.0"?>

<project name="intranet-theme" basedir="." default="deploy">
<import file="../build-common-theme.xml" />

<property name="theme.parent" value="_styled" />
</project>

Thanks & Regards,
Amit Doshi
suneel kumar, modificado 8 Anos atrás.

RE: Liferay 6: Customizing the default page of Liferay

New Member Postagens: 15 Data de Entrada: 15/09/15 Postagens Recentes
Hi Ravi,

How do u set title bar as "ravi"?
pls tell me that code for title bar...

when i click on "control panel" it display some other name . now i should dispaly as "control panel" title bar.
tell me that code where i need to change that