Question

I'm using the extension "Youama Ajax Login and Register", and it inserts an html page that serves as a modal window (lightbox popup or do not know how to call it).

however, it inserts the html on:

<div class="wrapper">
  <div class="page">
    <div class="main-container">
      <div class="main">
        <div class="col-main">
          <div class="col-home">
              /* [HERE] */

I wish he was inserted after the body. any idea how to do this?

Was it helpful?

Solution

You would need to identify the XML that Youama is using to place that block at that point in you code and then move it to be rendered as a child of the block after_body_start.

So for example in your local.xml file you could do something like...

<default>
    <!-- Youama Ajax Login and Register -->
    <reference name="after_body_start">
        <block type="youama/ajaxlogin" name="youama_login" as="youama_login" template="youama/ajaxlogin.phtml" />
    </reference>
</default>

Please note I made all the attribute values up - you will need to copy them from the Youama XML for the block.

You will also need to remove the Youama block from it's current assignment or you will have it on your page twice. Which might be something like

<reference name="content">
            <action method="unsetChild"><name>youama_login</name></action>
</reference>

Plan B : write some JavaScript to rip the DOM node out from its current posisiton and re-insert it after <body> but that is a bit of a hack and not really encouraged.

Either way you might have to check the CSS selectors in case moving the HTML changes the CSS paths to the nodes that are being styled or selected via JavaScript.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top