Jump to content

Custom Page Subtitle


Basheer

Recommended Posts

Hi,

 

I can see a code like

"

{if $title}

<h2>{$title}</h2>

{/if}

{$msg}

"

 

in template/includes/alert.tpl.

 

In my custom page $ca->setPageTitle('Test'); In this case i get "Test" as {$title}, My question is what is the value of{$msg} (I tried assign('msg','some value')); But it is not working.

Link to comment
Share on other sites

isn't $msg defined in the template, e.g in clientareadomaindns.tpl...

 

{if $error}
   {include file="$template/includes/alert.tpl" type="error" msg=$error}
{/if}

or in clientregister.tpl...

 

{if $registrationDisabled}
   {include file="$template/includes/alert.tpl" type="error" msg=$LANG.registerCreateAccount|cat:' <strong><a href="cart.php" class="alert-link">'|cat:$LANG.registerCreateAccountOrder|cat:'</a></strong>'}
{/if}

off the top of my head, I don't recall ever defining it's value in the PHP file...

Link to comment
Share on other sites

Sorry Brian, I didnt get you,

 

{if $title}
       <h2>{$title}</h2>
   {/if}
   {$msg}

This is in alert.tpl

 

I want to pass some value to $msg varibale from my custom page. How can it possible? I tried $a->assign()function but it is not worked.

Link to comment
Share on other sites

I assume your custom page is in two parts - the .php file that creates the page and the template that contains the content... what i'm suggesting is that you define what $msg is in the template and not in the PHP file like you're trying to do.

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