[Typo3] insert page content in templates?
Anders Carlén
anders at carlens.se
Tue Jun 28 12:34:38 CEST 2005
Christopher, Thank you for your help again,
It has been interesting working on this for the last 12 hours. I am
learning a lot... slowly but surely.
> You're right, sorry! I hadn't realized that it showed the 'old school'
> way. Anders, here's a more up-to-date (and slightly simpler) way,
> complete:
I have managed to get almost everything up and running - but can´t seem
to get the redirection to work. (When a user logs on, they should be
sent to index.php?id=1 and when they log out they should be sent to
index.php?id=47 )
I tried adding this to the field "redirect":
<input name="redirect_url" value="index.php?id=47" type="hidden" />
Do I have to add something more?
/anders
For reference: The whole code in my TypoScript Setup follows:
############ NEW SCHOOL ##########
# Login stuff:
lib.forms.logout = COA
lib.forms.logout {
5 = COA
5 {
stdWrap.dataWrap = <form action="index.php?id={TSFE:id}"
method="post">|</form>
5 = HTML
5.value = <p><strong>You are logged in as:[<!--###USERNAME###-->].
</strong> <input name="submit_2" id="tx-newloginbox-pi1-logout_submit"
value="Logout" type="submit" class="button" /> <input name="submit"
id="tx-newloginbox-pi1-logout_submit" type="image"
src="fileadmin/template/images/icons/log_out.gif" width="10" height="8"
vspace="2" border="10" alt="Logout"/> </p>
10 = HTML
10.value = <input name="logintype" value="logout" type="hidden" />
15 = HTML
15.value = <input name="pid" value="46" type="hidden" />
}
}
lib.forms.login = COA
lib.forms.login {
stdWrap.dataWrap = <form action="index.php?id={TSFE:id}"
method="post">|</form>
5 = HTML
5.value (
<p><strong>Registered user login:</strong></p>
<p>
<label for="tx-newloginbox-pi1-user">Username:</label> <input
name="user" value="" id="tx-newloginbox-pi1-user" type="text"
class="field" />
</p>
<p>
<label for="tx-newloginbox-pi1-pass">Password:</label> <input
name="pass" value="" id="tx-newloginbox-pi1-pass" type="password"
class="field" />
</p>
<p>
<input name="submit" value="Login"
id="tx-newloginbox-pi1-login_submit" type="submit" class="button" /></p>
</p>
<input name="logintype" value="login" type="hidden" />
<input name="pid" value="46" type="hidden" />
<input name="redirect_url" value="index.php?id=47" type="hidden" />
)
}
More information about the TYPO3-english
mailing list