Jump to content

Combining Clientarea details pages


ralphonz

Recommended Posts

Hi Guys,

 

I'm making a custom template to fit with my site and I want to combine all the client area details pages: My details, sub-contacts, add contact, change password and security settings). These are fairly lightweight and could all be on one page which would also enable me to use the kind of mobile-compatible layout i want to have.

 

So far it's easy to include them all on one page in the My Details template. For example to show the sub-contacts page I'm using:

{include file="$template/clientareacontacts.tpl"}

 

However, a problem arises when one of the forms is submitted, as the action on each one is set to itself. For example:

{$smarty.server.PHP_SELF}?action=contacts

So it redirects to that page upon submission. If i change the action to point at my details the form isn't submitted and doesn't work.

 

Can anyone think of a way round this?

 

Thanks

Link to comment
Share on other sites

I managed to get around this problem by making all the details templates the same and including the forms by placing them in separate template files like this:

 

<!--My Details-->

<article class="my-details clearfix" role="article">

<header class="article-header blue1">

<h3 class="h3"><i class="fa fa-user"></i>   {$LANG.clientareanavdetails}</h3>

</header>

{include file="$template/clientareadetailsform.tpl"}

</article>

 

<!--Sub-Accounts-->

<article class="sub-accounts clearfix" role="article">

<header class="article-header blue2">

<h3 class="h3"><i class="fa fa-group"></i>   {$LANG.clientareanavcontacts}</h3>

</header>

{include file="$template/clientareacontactsform.tpl"}

</article>

 

etc...

 

However, one problem with this is that certain parts aren't populated with the data. Security settings is always blank when included from another page, as is the client information on the main details page. I assume this is because those variables are not available from the current page so how would one go about making them available?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated