Fórumok

Hardcode login portlet into theme

Mason Stein, módosítva 11 év-val korábban

Hardcode login portlet into theme

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.12.05. Legújabb bejegyzések
Hey guys,

is it possible to place the login portlet into a theme?
I want to place it instead the "sign in" link, so the email and password fields will be visible.. (like www.swisher.com =))

The thing is, I can place it into every page but only by moving it into the page area where the "content" div is.

I need a little help to understand :

<div id="content">
		...
		#if ($selectable)
			$theme.include($content_include)
		#else
			$portletDisplay.recycle()
			$portletDisplay.setTitle($the_title)
			$theme.wrapPortlet("portlet.vm", $content_include)
		#end
	</div>


Is there a way to write the code from the login protlet into a different div that I place ..lets say, instead of
#if (!$is_signed_in)
			<a href="$sign_in_url" id="sign-in" rel="nofollow">$sign_in_text</a>
		#end


many thx!!!
Bradley Wood, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme (Válasz)

Mason Stein, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.12.05. Legújabb bejegyzések
Bradley! Many THX"
That was exactly what I was looking for...
I left $queryString blank....thats ok, right?
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Or pass an empy string
e.g.
$theme.runtime(portletId, '', $velocityPortletPreferences.toString())
Mason Stein, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.12.05. Legújabb bejegyzések
Hey Hitoshi,

yeah, thats what I ment..
works!

THX
Bradley Wood, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme (Válasz)

Mason Stein, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.12.05. Legújabb bejegyzések
THX Bradley,
I will do that!

Thanks again for your help!!
Mason Stein, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.12.05. Legújabb bejegyzések
Hey again,

I did all as you told me and it´s excactly what I want.
Still I am facing a problem and I absolutly don´t know what to do....

My Login Portlet is now visible in the upper right side on every page (as long as the user is not logged in), ok, but when I click on "create account" or "forgot password" the portlet is visible two times:
i) still in the upper right side
AND
ii) inside the content div

How can I regulate this?
I mean, can I put the login portlet with "email" and "password" in one position and hide it, if someone wants to sign up (and put this into content div)?

Many many thx!!
Bradley Wood, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Mason Stein, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.12.05. Legújabb bejegyzések
Hey Bradley,

thx for help! I did that already to position my login portlet in the upper side...
It is wrapped into a div.

What I don´t understand: Why does it appear in the content when I press "register"..
I do understand what you mean by css and "display: none" ... I used that for hiding the head/titel of portlet.

But how can I differentiate between login portlet in initial state and login portlet in "I pressed the register or forgot my password" state...=(

Mellékletek:

Bradley Wood, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Mason Stein, módosítva 11 év-val korábban

RE: Hardcode login portlet into theme

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.12.05. Legújabb bejegyzések
Hey,

really, I am sorry to bother you...
I´d love to write a hook and change that.

But honestly I can´t find the right place to hook on...
I looked at
\html\portlet\login\create_account.jsp --> did´t find =(
\html\portlet\login\navigation.jsp --> did´t find =(
\html\portlet\login\login.jsp --> did´t find =(

My idea was to
wrap login into <div id= "myLoginVersionLogin"> and
wrap create_account into <div id= "myLoginVersionCreateAccount"> ...
to be able to control them with css..

Please help me with this one...
And still I dont know what makes my login portlet be written into content..=(


Many many thx, again and again...!!