Hi Guys!
I have extended user template that contain :
When a user register, he need to choose 3 upline. But what i want is :
In every user page view "http://www.site.com/user/user-name", i put a registration databound. And to register, the new user will ask the registered user page view link to register and the "upline1" will become the current accessed user page view.
I hae try this with db persist form :
but the relation upline1 still remain empty.
And for the upline2 & upline3, can it picked randomly?
Thx!
I have extended user template that contain :
- Code: Select all
<?php require_once( 'asep/cms.php' ); ?>
<cms:template clonable='1' title='Users' routable='1' hidden='1'>
<cms:editable
name='upline1'
label='Upline 1'
type='relation'
has='one'
reverse_has='many'
masterpage='user.php'
order='1'
/>
<cms:editable
name='upline2'
label='Upline 2'
type='relation'
has='one'
reverse_has='many'
masterpage='user.php'
order='2'
/>
<cms:editable
name='upline3'
label='Upline 3'
type='relation'
has='one'
reverse_has='many'
masterpage='user.php'
order='3'
/>
<!-- define routes -->
<cms:route name='list_view' path='' />
<cms:route name='page_view' path='{:page_name}' filters='page_exists=name'>
<cms:route_validators
page_name='title_ready'
/>
</cms:route>
</cms:template>
<!-- find the matched route (view). Respond with 404 if no route matches. -->
<cms:match_route debug='0' is_404='1' />
<!-- implement the selected view -->
<cms:if k_matched_route='list_view'>
<cms:abort is_404='1' />
<cms:else_if k_matched_route='page_view' />
<cms:embed 'registar.html' />
</cms:if>
<?php COUCH::invoke( K_IGNORE_CONTEXT ); ?>
When a user register, he need to choose 3 upline. But what i want is :
In every user page view "http://www.site.com/user/user-name", i put a registration databound. And to register, the new user will ask the registered user page view link to register and the "upline1" will become the current accessed user page view.
I hae try this with db persist form :
- Code: Select all
upline1=k_page_id / name / title
but the relation upline1 still remain empty.
And for the upline2 & upline3, can it picked randomly?
Thx!