Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Default how do I relocate messagestack output?

    How could I move the div class="messageStackSuccess" somewhere else in the page instead of on top?

  2. #2
    Join Date
    Feb 2008
    Location
    UK
    Posts
    43
    Plugin Contributions
    0

    Default Re: how do I relocate messagestack output?

    I'd like to know the answer to this too. Loads of people have asked about it, but there don't seem to have been any replies. It looks like the message is written to the page using Javascript as it doesn't appear in the source code.

  3. #3
    Join Date
    Feb 2008
    Location
    UK
    Posts
    43
    Plugin Contributions
    0

    Default Re: how do I relocate messagestack output?

    Ok think I'm getting somewhere. In my case, I wanted to move the 'email successfully sent' message that belongs to 'tell a friend'. The only way to do this was to edit the 'header_php.php' file in includes > modules > pages > tell_a_friend.

    I changed line 122 from
    PHP Code:
    $messageStack->add_session('header'sprintf(TEXT_EMAIL_SUCCESSFUL_SENT$product_info->fields['products_name'], zen_output_string_protected($to_name)), 'success'); 
    to

    PHP Code:
    $messageStack->add_session('product_info'sprintf(TEXT_EMAIL_SUCCESSFUL_SENT$product_info->fields['products_name'], zen_output_string_protected($to_name)), 'success'); 
    This seems to tell the message to appear in the space designated for it in the product info template, rather than in the common header template. Smacks of a bit of a hack though and presumably you'd have to identify every occasion where the message is set to appear in the header and change it? I don't ever want it at the top of the page as I have absolutely positioned stuff up there and it will mess up my layout.

  4. #4
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Default Re: how do I relocate messagestack output?

    Here's how I relocated the messagestack output. I moved the following code:

    <?php
    // Display all header alerts via messageStack:
    if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
    }
    if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
    echo htmlspecialchars(urldecode($_GET['error_message']));
    }
    if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
    echo htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>

    from common\tpl_header.php to common\tpl_main_page.php immediately before <!-- bof breadcrumb -->

  5. #5
    Join Date
    Feb 2008
    Location
    UK
    Posts
    43
    Plugin Contributions
    0

    Default Re: how do I relocate messagestack output?

    That's great. Thought there must be an elegant solution somewhere. Thanks for posting it.

 

 

Similar Threads

  1. my messageStack output 2 times, how to fix?
    By linjuming in forum General Questions
    Replies: 0
    Last Post: 14 Mar 2013, 11:17 AM
  2. messageStack output not returning value sitewide
    By patmanami in forum General Questions
    Replies: 2
    Last Post: 28 Oct 2010, 07:07 AM
  3. Replies: 1
    Last Post: 30 Oct 2009, 05:46 PM
  4. How do I relocate the privacy statement?
    By Einstin in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Jun 2007, 09:11 PM
  5. No messageStack output at all
    By ericpeng in forum General Questions
    Replies: 5
    Last Post: 2 Mar 2007, 07:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg