Die Beste Aller Zeiten

Going direct to heaven, going direct the other way

Joomla 1.0.xx Multiple Component per Page Workaround

Since I wrote a Module for Joomla to display content items in module positions I’ve been asked if it could be used to display other components than com_content in module positions as well. No it can’t and it would be to much work to change this. I can, however, offer a workaround that did the trick for me:

  • Go to the Menu Manager and create a new Menu (but don’t publish it)
  • Create a blank template (a template with just a mainbody call) or download and install from here: blank.zip
  • In your new Menu create a Link to the item or component you want to display
  • Go to template manager and assign the blank template to the link you’ve just created.
  • Download mod_iframe.zip and install. This is a module that will insert an iframe in a module position and allow you to specify source url, height and width. Install the module.
  • enter the link you’ve just created as source, assign a position and publish.

Quite probably you will need to edit the template.css file for the blank template so fonts and colors will fit in your main template – remember that the content of the iframe is a page on it’s own, even if it’s embedded in another page, and will not be affected by changes from your standard css files.

Usually all links to other sites would open inside the iframe, which is most likely not what you want. So I added a small Javascript to the blank template that opens relative links and links on the same server within the frame and outgoing links in a new window or tab (the javascript adds a target attribute and it depends on the browser how this is handled).

I can say that it worked for me with a fresh installation of Joomla 1.0.12. If you get any errors feel free to contact me, I’ll see if I can help you.

    Previous

    First !

    Next

    Shuttle Endeavour launched safely

    3 Comments

    1. Love the advice. Thank you.

    2. hi, a quick question for you, I’m using your content item module on one of my sites and was wondering, can I use more than one copy of it on one site, I tried toupload it again using a different file name but it didn’t work….is there any way of doing it so that I can run it more than once in different module positions with different content ?
      regards
      Dave

    3. Man, I’d love to get weblinks viewing on the home page of this site in the right column. Its a struggle. The solution you’ve provided would probably work but it doesnt support joomla 1.5

      any thoughts on a solution?

      thanks in advance and by the way your Place Here Mod rocks. It shold def be a core feature of joomla.

    Comments are closed.

    Powered by WordPress & Theme by Anders Norén