Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • scotty Friend
    #136134

    Joomla 1.5 comes with a core plugin called ‘Load Module’. Using this plugin it is very easy to place any module inside an article or in the main content area. It can also be used to place a system module inside a customHTML module.

    The syntax used is {loadposition positionname}. The positionname can be anything you want but make sure it is not a position you already use.

    So for example, let’s say we want to place a banner ad between two paragraphes inside an artice. Our artice in our editor would look like this, using the position name adpos1.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris nec mi ut lorem rhoncus molestie. Integer quis sapien. Proin purus mauris, aliquet non, pharetra at, vestibulum et, massa. Nullam eget magna sit amet ante consectetur semper. Morbi congue enim nec sapien. Nulla facilisi. Morbi mi odio, venenatis ac, mattis nec, dapibus vitae, nunc.

    {loadposition adpos1}

    Maecenas eget arcu. Curabitur elementum nulla a massa. Quisque eleifend pharetra purus. Nullam id mi. Cras vestibulum mauris sed mauris. Sed facilisis massa eget elit. Praesent ligula risus, semper et, tristique non, scelerisque aliquam, nisi. Aliquam erat volutpat. Suspendisse potenti. Ut nec turpis vitae diam luctus mattis. Aenean sollicitudin vulputate enim.
    Now we go to our Module Manager and open our Banner Module(mod_banners). In the Position drop-down box we type adpos1. This will create a new module position. Set Menu Assignment to All.

    Now anywhere we use {loadposition adpos1} will show a banner ad. Cool or what?

    You can also place the syntax inside a <div> to give some styling like a border or margins. So for our example we could use…

    <div style=”margin: 20px auto;”>{loadposition adpos1}</div>This would give us a margin of 20px above and below our banner and an auto margin (ie. centered) left and right margin.

    sunrise Friend
    #312786

    Hi Scotty, I see you wrote this some time back but I just read it today. Thanks a lot for taking the time to write. Great tip.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  sunrise 14 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum