Jump to content

custom pages [-FROM ?action=NAME -TO NAME.php]


Recommended Posts

Hi,

 

I used the wiki custom template instructions to create a details.php page. From the client area, I want to load the page by:

details.php

vs.

clientarea.php?action=details

 

The page loads great, however, the users info is not pre-filled in the form.

 

The reason for this, I want the breadcrumbnav (and corresponding icon images I created for each page) to change for these 'action' called pages. It will only work if it's an actual named page, so I would like to know if there is a way to create a php page for the 'My Details' Page and others? And actually have it work from the database info?

 

Thanks,

Tracy

Link to comment
Share on other sites

Hi,

 

I used the wiki custom template instructions to create a details.php page. From the client area, I want to load the page by:

details.php

vs.

clientarea.php?action=details

 

The page loads great, however, the users info is not pre-filled in the form.

 

The reason for this, I want the breadcrumbnav (and corresponding icon images I created for each page) to change for these 'action' called pages. It will only work if it's an actual named page, so I would like to know if there is a way to create a php page for the 'My Details' Page and others? And actually have it work from the database info?

 

Thanks,

Tracy

 

Possible: yes

Easy: no

 

The easiest way is probably to create a simple script in your header.tpl which shows the right icon.

 

Sample (based on the "default" template):

{if $filename eq "clientarea" and $smarty.get.action eq "details"}Details Icon
{elseif $filename eq "clientarea" and $smarty.get.action eq "contacts"}Contact Icon
{elseif $filename eq "clientarea" and $smarty.get.action eq "changepw"}Change Password Icon
{else}{if "templates/$template/images/$filename.png"|file_exists}<img src="templates/{$template}/images/{$filename}.png" align="right" alt="" />{/if}{/if}

Link to comment
Share on other sites

Working with what you gave me, I changed a little and got it to work:

 

{if $filename eq "clientarea" and $smarty.get.action eq "details"}<img src="templates/custom/images/details.png" align="right" alt="" />

{elseif $filename eq "clientarea" and $smarty.get.action eq "contacts"}<img src="templates/custom/images/contacts.png" align="right" alt="" />

{elseif $filename eq "clientarea" and $smarty.get.action eq "changepw"}<img src="templates/custom/images/changepw.png" align="right" alt="" />

{elseif "templates/$template/images/$filename.png"|file_exists}<img src="templates/{$template}/images/{$filename}.png" align="right" alt="" />{/if}

 

Notice the last line: combined {elseif versus having it separate with the xtra closing {/if} tag, and it works.

 

Thanks!

Tracy

 

Possible: yes

Easy: no

 

The easiest way is probably to create a simple script in your header.tpl which shows the right icon.

 

Sample (based on the "default" template):

{if $filename eq "clientarea" and $smarty.get.action eq "details"}Details Icon
{elseif $filename eq "clientarea" and $smarty.get.action eq "contacts"}Contact Icon
{elseif $filename eq "clientarea" and $smarty.get.action eq "changepw"}Change Password Icon
{else}{if "templates/$template/images/$filename.png"|file_exists}<img src="templates/{$template}/images/{$filename}.png" align="right" alt="" />{/if}{/if}

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