does anyone know what I am doing wrong here? I am trying to create profile pages for each user, but when I click the submit button, it doesn't take me to the user's page.
This is my form code:
<form method="get" accept-charset="UTF-8" class="form" action="/profile/{{ user }}"> <input type="hidden" name="action" value="users/login">
<input id="loginName" type="text" name="loginName" placeholder="username"
value="{{ craft.session.rememberedUsername }}">
<input id="password" type="password" name="password" placeholder="secret password">
<input type="submit" value="Login" class="login_enter">
<label class="remember">
<input type="checkbox" name="rememberMe" value="1" checked>
Remember me
</label>
{% if errorMessage is defined %}
<p class="remember">{{ errorMessage }}</p>
{% endif %}
I have a profile folder and an _profile template. I also added a custom route in the admin panel with the following URI
profile/*
And a link to the template
profile/_profile
The profile index file looks like this:
{% set users = craft.users %}
{% for user in users %}
<a href="/profile/{{ user }}">{{ user }}</a>
{% endfor %}
And the _profile file looks like this
{% extends "_account_register_layout" %}
{% set title = "account" %}
{% set user = craft.users.username( craft.request.segment(2) ).first() %}