Commenting out?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Commenting out?

Harvey
I have a macro called app_body_header

it loads a radar map on my forum page.

I only show the radar during a winter storm so I have been using "display none" in CSS to hide it.

But the map uses a lot of resources to load. Even when displaying none.

If I could comment it out it wouldn't but I couldn't figure out how to do it.

<override_macro name="app_body_header" requires="node_page,servlet">
    <n.page_node.>
        <div id="forum-header">
            <n.if.is_root>
                <then> 
                    <div id="harvey_img">
                        <a href="http://pro.accuweather.com/nx_mosaic_640x480c/sir/inmasirny_.gif">
                            <img alt="NY Radar"  style="border-width:0px 1px 1px 0px; border-style : solid; border-color:  black"  src="http://pro.accuweather.com/nx_mosaic_640x480c/sir/inmasirny_.gif"/>
                        </a>
                    </div> 
                </then>
            </n.if.is_root> 
            <h1 id="forum-title" class="app-title-[n.id/]"><n.subject/></h1>
            <div id="description-box">
                <n.mailing_list_information/>
                <n.node_message_as_html/>
            </div>
            <div id="search-box" class="search-box">
                <n.search_box/>
            </div>
        </div>
    </n.page_node.>
</override_macro> 

Can you help?  

HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Commenting out?

Pedro
You can use the tag n.comment.
<override_macro name="app_body_header" requires="node_page,servlet">
    <n.page_node.>
        <div id="forum-header">
<n.comment.>
            <n.if.is_root>
                <then> 
                    <div id="harvey_img">
                        <a href="http://pro.accuweather.com/nx_mosaic_640x480c/sir/inmasirny_.gif">
                            <img alt="NY Radar"  style="border-width:0px 1px 1px 0px; border-style : solid; border-color:  black"  src="http://pro.accuweather.com/nx_mosaic_640x480c/sir/inmasirny_.gif"/>
                        </a>
                    </div> 
                </then>
            </n.if.is_root>
</n.comment.> 
            <h1 id="forum-title" class="app-title-[n.id/]"><n.subject/></h1>
            <div id="description-box">
                <n.mailing_list_information/>
                <n.node_message_as_html/>
            </div>
            <div id="search-box" class="search-box">
                <n.search_box/>
            </div>
        </div>
    </n.page_node.>
</override_macro> 
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Commenting out?

Harvey
Thank you.

Works and page loads faster too.

:)
HTTPS Please!