Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
kawther JN
help me with FOOTER plz !
December 16, 2012 9:56 PM
Answer

kawther JN

Rank: Regular Member

Posts: 105

Join Date: August 2, 2012

Recent Posts

Hi,I have a problem with creating a Footer for the portal, I followed the exple mentioned in this link:
http://www.e-kon.be/blog/item/two-ways-to-embed-web-content-in-liferay-themes
I got the Footer embed but not the bottom of the page,I got it in the begining of the page.

In fact I've changed 4 files in the theme:

1-in "portal-normal.vm", I added the following line:
<div id="footer"> $ footerContent </ div>

2 - in "liferay-look-and-feel.xml" I added:
<settings>
<setting key="footer-article-id" value="footer" />
</ settings>

3 - in "init_custom.vm" I added:
# set ($ footerArticleId theme_settings.getProperty = $ ("footer-article-id"))
# set ($ footerContent journalContentUtil.getContent = $ ($ group_id, $ footerArticleId, null, "$ local", $ theme_display))

4 - in "custom.css" I added:
# footer {
position: relative;
margin-top:-150px; / * negative value of footer height * /
height: 150px;
clear: both;
}
As I said the Footer is not in the correct location (bottom of the page), I think the CSS I tried to apply (in # footer) was not applyed correctly, I dont know why.
I am using liferay 6.1

thank you if you can help me
Apoorva Prakash
RE: help me with FOOTER plz !
December 16, 2012 10:10 PM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

kawther JN:

1-in "portal-normal.vm", I added the following line:
<div id="footer"> $ footerContent </ div>


Hello Kawther,

You should try including the above line in the end of the portal-normal.vm

Hope this will help...

Thanks and Regards,
Apoorva Prakash
kawther JN
RE: help me with FOOTER plz !
December 17, 2012 12:28 AM
Answer

kawther JN

Rank: Regular Member

Posts: 105

Join Date: August 2, 2012

Recent Posts

thank u Apoorva Prakash but nothing changed yet.
maybe the pb is with the css code:

html, body { height: 100%;}
...

/* ---------- Main ------------ */

#main {overflow:auto;
padding-bottom: 150px;} /* must be same height as the footer */
...

/* ---------- Footer ---------- */
]#footer {
position: relative;
margin-top: -150px; /* negative value of footer height */
height: 150px;
clear:both;
}
for the footer I am using a web content which is embed :

<div id="body">
<div id="container">
<div id="content">
&nbsp;</div>
</div>
<div id="footer">
......
</div>
</div>
Priyanka Dhingra
RE: help me with FOOTER plz !
December 16, 2012 11:27 PM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

since id's should be unique why dont you try using a class instead.
kawther JN
RE: help me with FOOTER plz !
December 17, 2012 4:10 AM
Answer

kawther JN

Rank: Regular Member

Posts: 105

Join Date: August 2, 2012

Recent Posts

it didnt work using a class too !
any help plz
Anil Sunkari
RE: help me with FOOTER plz !
December 17, 2012 5:06 AM
Answer

Anil Sunkari

Rank: Expert

Posts: 385

Join Date: August 11, 2009

Recent Posts

Hi,Can you paste you portal_normal.vm code here????
kawther JN
RE: help me with FOOTER plz !
December 17, 2012 9:13 AM
Answer

kawther JN

Rank: Regular Member

Posts: 105

Join Date: August 2, 2012

Recent Posts

portal_normal.vm:

<!DOCTYPE html>

#parse ($init)

<html class="#language("lang.dir")" dir="#language("lang.dir")" lang="$w3c_language_id">

<head>
<title>$the_title - $company_name</title>

$theme.include($top_head_include)
<script src="$javascript_folder/jquery-1.8.2.min.js"></script>
<script src="$javascript_folder/jquery.bpopup-0.7.0.min.js"></script>


</head>

<body class="$css_class">

$theme.include($body_top_include)

#if ($is_signed_in)
#dockbar()
#end

<div id="wrapper">
<a href="#main-content" id="skip-to-content">#language("skip-to-content")</a>

<header id="banner" role="banner">
<div id="heading">

<h2 class="page-title">
<span>$the_title</span>
</h2>
</div>

#if (!$is_signed_in)
<a href="$sign_in_url" id="sign-in" rel="nofollow">$sign_in_text</a>
#end

#if ($has_navigation || $is_signed_in)
#parse ("$full_templates_path/navigation.vm")
#end
</header>

<div id="content">
<nav class="site-breadcrumbs" id="breadcrumbs">
<h1>
<span>#language("breadcrumbs")</span>
</h1>

#breadcrumbs()
</nav>

#if ($selectable)
$theme.include($content_include)
#else
$portletDisplay.recycle()

$portletDisplay.setTitle($the_title)

$theme.wrapPortlet("portlet.vm", $content_include)
#end
</div>
</div>

<div id="FOOTER">$footerContent</div>

$theme.include($body_bottom_include)

</body>
$theme.include($bottom_include)

</html>
Priyanka Dhingra
RE: help me with FOOTER plz !
December 17, 2012 9:45 PM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

the id here in
1<div id="FOOTER">$footerContent</div>


should be "footer" and not "FOOTER"
in init-custom.vm put like this
1#set ($footerArticleId = $theme_settings.getProperty("footer-article-id"))
2#set ($footerContent = $journalContentUtil.getContent($group_id, $footerArticleId,null, "$locale", $theme_display))


if it doesnt work try removing the #footer css(that you placed hopefully in custom.css) coz if that is for sure the problem is than we'll move in to that direction
Anil Sunkari
RE: help me with FOOTER plz !
December 17, 2012 9:59 PM
Answer

Anil Sunkari

Rank: Expert

Posts: 385

Join Date: August 11, 2009

Recent Posts

Yes whatever Priyanka said is right.Addition to that once you done with this changes.
You can just check from the debugging tool depends on your browser.Wether class got reflected w.r.t attributes.
Plz tryy thatttt...All d best!
Hari Dobbala
RE: help me with FOOTER plz !
December 17, 2012 10:23 PM
Answer

Hari Dobbala

Rank: Junior Member

Posts: 29

Join Date: November 17, 2012

Recent Posts

I think you need to add 2 more below attributes in css class for footer to appear the div in footer of the page.

position: fixed;
bottom: 0px;

Hope this may help you.
kawther JN
RE: help me with FOOTER plz !
December 18, 2012 11:16 AM
Answer

kawther JN

Rank: Regular Member

Posts: 105

Join Date: August 2, 2012

Recent Posts

hi guys, thank u for ur help.
I tried what you told me to do..I corrected portal_normal.vm and init-custom.vm , I removed #footer css and I add (position: fixed; bottom: 0px;)
but I didnt get the footer at the bottom..it moved a bit downer thats all !
is there a pb with my css (#footer) ??
Priyanka Dhingra
RE: help me with FOOTER plz !
December 18, 2012 9:20 PM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

if you'll palce it like following in portal-normal.vm
 1</div>
 2
 3    <footer id="footer" role="contentinfo">
 4        [b]<div id="footer">$footerContent</div>[/b]
 5    </footer>
 6</div>
 7
 8$theme.include($body_bottom_include)
 9
10</body>

you'll get it back to the correct position
Hari Dobbala
RE: help me with FOOTER plz !
December 19, 2012 2:11 AM
Answer

Hari Dobbala

Rank: Junior Member

Posts: 29

Join Date: November 17, 2012

Recent Posts

After adding as said priyanka in portal-normal.vm, I think you need to add below css to appear on the bottom of the page.

#footer {
bottom: 0;
position: fixed;
}
Priyanka Dhingra
RE: help me with FOOTER plz !
December 19, 2012 2:48 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

id="footer" is already defined
rest is your custom css changes to override the same
kawther JN
RE: help me with FOOTER plz !
December 19, 2012 10:00 PM
Answer

kawther JN

Rank: Regular Member

Posts: 105

Join Date: August 2, 2012

Recent Posts

hi, thank a lot Priyanka Dhingra and Hari Dobbala for ur help
after those changes, the footer is now in a right position but in the top of the page not the bottom. ( Hari Dobbala : I added bottom: 0;position: fixed; to #footer css but the footer is not getting in the bottom)
I will try to modify custom.css till I get the footer in the bottom.