Foren

help me with FOOTER plz !

kawther JN, geändert vor 11 Jahren.

help me with FOOTER plz !

Regular Member Beiträge: 103 Beitrittsdatum: 03.08.12 Neueste Beiträge
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
thumbnail
Apoorva Prakash, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Liferay Master Beiträge: 658 Beitrittsdatum: 15.06.10 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Regular Member Beiträge: 103 Beitrittsdatum: 03.08.12 Neueste Beiträge
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>
thumbnail
Priyanka Dhingra, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Liferay Master Beiträge: 501 Beitrittsdatum: 20.12.11 Neueste Beiträge
since id's should be unique why dont you try using a class instead.
kawther JN, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Regular Member Beiträge: 103 Beitrittsdatum: 03.08.12 Neueste Beiträge
it didnt work using a class too !
any help plz
thumbnail
Anil Sunkari, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Expert Beiträge: 427 Beitrittsdatum: 12.08.09 Neueste Beiträge
Hi,Can you paste you portal_normal.vm code here????
kawther JN, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Regular Member Beiträge: 103 Beitrittsdatum: 03.08.12 Neueste Beiträge
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>
thumbnail
Priyanka Dhingra, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Liferay Master Beiträge: 501 Beitrittsdatum: 20.12.11 Neueste Beiträge
the id here in
<div id="FOOTER">$footerContent</div>


should be "footer" and not "FOOTER"
in init-custom.vm put like this
#set ($footerArticleId = $theme_settings.getProperty("footer-article-id"))
#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
thumbnail
Anil Sunkari, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Expert Beiträge: 427 Beitrittsdatum: 12.08.09 Neueste Beiträge
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!
thumbnail
Hari Dobbala, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Junior Member Beiträge: 29 Beitrittsdatum: 18.11.12 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Regular Member Beiträge: 103 Beitrittsdatum: 03.08.12 Neueste Beiträge
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) ??
thumbnail
Priyanka Dhingra, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Liferay Master Beiträge: 501 Beitrittsdatum: 20.12.11 Neueste Beiträge
if you'll palce it like following in portal-normal.vm


	<footer id="footer" role="contentinfo">
		[b]<div id="footer">$footerContent</div>[/b]
	</footer>


$theme.include($body_bottom_include)


you'll get it back to the correct position
thumbnail
Hari Dobbala, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Junior Member Beiträge: 29 Beitrittsdatum: 18.11.12 Neueste Beiträge
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;
}
thumbnail
Priyanka Dhingra, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Liferay Master Beiträge: 501 Beitrittsdatum: 20.12.11 Neueste Beiträge
id="footer" is already defined
rest is your custom css changes to override the same
kawther JN, geändert vor 11 Jahren.

RE: help me with FOOTER plz !

Regular Member Beiträge: 103 Beitrittsdatum: 03.08.12 Neueste Beiträge
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.