How can i add new module positions on a Joomla 1.5 site?

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
td1968
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Jul 26, 2007 1:53 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by td1968 » Wed Mar 12, 2008 2:32 pm

The module position field on the edit module screen is a combo box. You can add a new module position by simply typing it in here. I am newb to Joomla so I wont pretend to know all of what happens in the database, xml or php files but it appears that you can then simply reference this new module in the html and css files to set position and style.

I have not tested placing it or styling it specifically yet but I have been successful in creating a new module position that I do not want to appear anywhere for the purpose of using the {loadposition xxxx} command to reference it in a content item. Hope this helps.

td

User avatar
darb
Joomla! Hero
Joomla! Hero
Posts: 2038
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden

Re: How can i add new module positions on a Joomla 1.5 site?

Post by darb » Wed Mar 26, 2008 10:27 am

Hope this will be solved .

conform
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Feb 13, 2007 8:04 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by conform » Wed Mar 26, 2008 9:41 pm

Hello.

I was struggling with the same problem while perusing J!1.5. But I was able to click into the "position" text box and type it in. If in fact this does work. I have to figure out how to delete the unwanted module positions I added to test.

Hope this helps.

Image

User avatar
Quads
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sat Jan 12, 2008 6:27 am

Re: How can i add new module positions on a Joomla 1.5 site?

Post by Quads » Wed Mar 26, 2008 10:05 pm

And where in your template does "WHATEVER" show up?

conform
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Feb 13, 2007 8:04 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by conform » Wed Mar 26, 2008 10:50 pm

The template I'm using has predefined positions. So for my problem and what I thought the rest of you had was being able to activate those predefined positions, no? For instance, my problem was not being able to access the admin module position page. I needed to activate the already positioned "topsl".

My issue was in the activation, maybe I chimed in without really understanding the true problem. :(

rteeples
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Fri Mar 23, 2007 9:43 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by rteeples » Fri Apr 18, 2008 3:01 am

Yeah everyone, this is really easy:

In the Module settings, you can either select the position from one in the drop-down, or simply type a new module position in the box. If it's not there, it creates it.

unclefudgly
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Sat May 31, 2008 9:24 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by unclefudgly » Sat Aug 09, 2008 2:01 pm

I still don't see how adding a module postion in the module settings drop down solves anything. OK so a new position is created but unless you call it by {loadposition ****} in a content item, how do you access it?? It still hasn't any reference on the page has it??

I want to create two new module positions on the front page where the main content would normally be, so I can insert other modules into those positions.

How can I do that??

User avatar
BobbyS
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Tue Jul 03, 2007 11:32 pm
Location: Alb, NM

Re: How can i add new module positions on a Joomla 1.5 site?

Post by BobbyS » Sat Aug 09, 2008 8:59 pm

and you do not want to use {loadposition xxx}

unclefudgly
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Sat May 31, 2008 9:24 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by unclefudgly » Sat Aug 09, 2008 10:26 pm

No I don't want to use load position, I want to create a new module position like those already present, but in the area currently occupied by main body. I"m using the JA_Purity template and I like it, but it is not up to the job as is. Where in the install are the positions of the modules in the template fixed? Index.php?

Can I use code similar to below creating instead user7 and user8 and then call it inside the ja-content div??
<?php if($this->countModules('user4')) : ?>
<div id="ja-search">
<jdoc:include type="modules" name="user4"
Obviously I'm no expert so a idiots guide would help

Thanks

User avatar
BobbyS
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Tue Jul 03, 2007 11:32 pm
Location: Alb, NM

Re: How can i add new module positions on a Joomla 1.5 site?

Post by BobbyS » Sun Aug 10, 2008 4:42 am

I am not either. That template has a lot going on in it. This is my best option for you.

http://www.joomlart.com/forums/forumdisplay.php?f=102

unclefudgly
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Sat May 31, 2008 9:24 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by unclefudgly » Sun Aug 10, 2008 10:22 am

I've done what I wanted to do and it wasn't that hard.

First I created my new module where i wanted it in JA_purity/index.php

in my case in main content, so:
<!-- my new module -->

<?php if ($this->countModules('user99)) : ?>
<div id="ja-user99">
<jdoc:include type="modules" name="user99" style="xhtml" />
</div>
<?php endif; ?>
Then I added the class #ja-user99 in main divs to my template.css for later styling.

Then I added the position to my templateDetails.xml so:

<position>user99</position>

All you need to do is change "user99" to whatever you want and that's it, it all seems to do what I wanted and I can now place new modules in that position.

Hope this helps anyone else looking for this info, why it's so hard to find out this stuff is beyond me.

I guess this is solved! at least for me

edit: you can also change module style, by changing style="xhtml" to style="jarounded" to have a module position with rounded corners.

:D

User avatar
BobbyS
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Tue Jul 03, 2007 11:32 pm
Location: Alb, NM

Re: How can i add new module positions on a Joomla 1.5 site?

Post by BobbyS » Sun Aug 10, 2008 9:52 pm

Great! So how did you position the module where you wanted it within the main content area? Did you make it a certain size?

unclefudgly
Joomla! Apprentice
Joomla! Apprentice
Posts: 47
Joined: Sat May 31, 2008 9:24 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by unclefudgly » Sun Aug 10, 2008 10:15 pm

Like I said the only positioning was done by placing the new module inside the div I wanted. In this case I put it after the ja-content div, and after the breadcrumbs module, so it effectively will be at top centre of my page above the body content, articles and so on.

The module positions are not defined size wise in index.php, they will be styled using CSS if needed. Personally I think it's better not to define the size, it would be better to define the size of whatever goes into it, slideshow etc. That way it will be more flexible to use.

I've tried it with four different modules, and so long as these are defined in module manager, they just fit perfectly, if not then just change the parameters for that module in module manager.

User avatar
dattard
Joomla! Ace
Joomla! Ace
Posts: 1035
Joined: Tue Apr 11, 2006 7:29 pm
Contact:

Re: How can i add new module positions on a Joomla 1.5 site?

Post by dattard » Thu Jan 08, 2009 6:02 pm

The following is a tutorial for creating Joomla Template Positions which I have written some time back, maybe it will be able to help a number of people here:

http://www.dart-creations.com/joomla/jo ... tions.html
https://www.collectiveray.com - We make Joomla and WordPress Easy: Tutorials, Tips and Tricks, Lots of Free Modules incl. Easy Paypal, Popin Window, Random Flash, Google AdSense, Slide Menu (dropdown), 2CO / Paypal payment, [youtube] module, and more!

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: How can i add new module positions on a Joomla 1.5 site?

Post by ranwilli » Mon Jan 19, 2009 2:20 pm

Adding a "position name" to the list is pretty simple, you just type it in when you have a module open. No need to have it listed in the XML file.

You do this by placing your cursor in the drop down select list of positions, and just type in what you want it to be named.
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

User avatar
firstlinkis
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Jan 28, 2009 6:50 am

Re: How can i add new module positions on a Joomla 1.5 site?

Post by firstlinkis » Sun Mar 29, 2009 9:05 pm

unclefudgly wrote:I've done what I wanted to do and it wasn't that hard.

edit: you can also change module style, by changing style="xhtml" to style="jarounded" to have a module position with rounded corners.

:D
Great thread,

I was wondering if you could realate where exactly the module styles are listed and if this location differs between templates?

I'd really like to experiment with module styles but am unable to trace a list of what ones I can use.

Cheers!

User avatar
pcutter
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Sun May 27, 2007 11:54 am
Location: Thailand
Contact:

Re: How can i add new module positions on a Joomla 1.5 site?

Post by pcutter » Tue May 19, 2009 1:09 am

Comrades,

I have read through this entire thread (including dattard's generous guide at: http://www.dart-creations.com/joomla/jo ... tions.html) and still can not find guidance on defining where exactly a new position (div...I guess) will appear on a given template. It seems like a black art!

If divs are just definition-less blocks that get laid down sequentially (and I'm not saying they are), then why do "positions" show up in so many different sizes and positions in the template preview? Where do the width and height of positions ultimately get defined? I can see that they need to be flexible but also seem to need to be constrained by some hard limits in order not to completely cause disaster in a given template.

I have been able (by following various posts here and through much trial and error and a lot of css editing) to eventually define and add a custom position and get it where I want it man was that ever a non-systematic process.

Are there any good editors / methods for systematically viewing/editing the <div> structure of an html or php document?

I wish I had time to go through the whole stepwise process of making a template and i know that there are some good guides out there but for now, I am hoping to get a bit of insight so as to tweak some existing templates.

Thanks in advance for any advice.

vjtemplates
Joomla! Explorer
Joomla! Explorer
Posts: 314
Joined: Sat Dec 27, 2008 6:16 am
Location: LA
Contact:

Re: How can i add new module positions on a Joomla 1.5 site?

Post by vjtemplates » Tue May 19, 2009 10:37 pm

pcutter wrote:Where do the width and height of positions ultimately get defined? I can see that they need to be flexible but also seem to need to be constrained by some hard limits in order not to completely cause disaster in a given template.
You can always set the width and height of any module div by giving "width" and "height" properties on its appropriate class or ID. If no width or height is specified, browsers will set it as "auto" by default.
Joomla Templates & VirtueMart Themes

http://www.vjtemplates.com

trcmf
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Wed May 27, 2009 12:07 pm

Re: How can i add new module positions on a Joomla 1.5 site?

Post by trcmf » Fri May 07, 2010 4:49 pm

Finally after wrestling through this for a few hours I got the module position to work. The problem I am having is that none of the modules show up when I put a module in that position. Any suggestions as to what I am doing wrong?

LittleBigToe
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Aug 21, 2009 12:36 pm
Location: Ottawa, Canada

Re: How can i add new module positions on a Joomla 1.5 site?

Post by LittleBigToe » Sun May 23, 2010 9:32 pm

Hi ... Any answer to this? I am in the very same dilemma, having benefited from the various postings to the point of having (I think) a new module position (actually split the 'user6' position of JA Mona into 'user6-left' and 'user6-right'). However, whatever I place in that position does not show up!

Also, I would *love* to create a position at the far left of the JA Mona template -- in the space above where the 'symbol' image goes -- but I have no clue how to do that.

Any insight at all would be appreciated!!!



-LBT

mkongx12
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Fri Oct 22, 2010 9:12 am

Re: How can i add new module positions on a Joomla 1.5 site?

Post by mkongx12 » Sun Dec 12, 2010 4:40 pm

Dear all,

I have this problem too as I have been trying to get this Corner Page Peel Banner (http://transition.floridahostweb.com/co ... banner-doc) work in my Joomlart RAsite template, but with no luck getting this on the top right hand corner. :'(

It says I should edit the index.php file, and do the tricks to add a new position (http://transition.floridahostweb.com/fh ... for-joomla). I even went to the Joomla documentation (http://docs.joomla.org/How_do_you_add_a ... osition%3F), still, no luck at all.

Here is my index.php file:

Code: Select all

<?php

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

include_once (dirname(__FILE__).DS.'libs'.DS.'ja.template.helper.php');

if( defined('_DEMO_MODE_') ) {
	$tmplTools = JATemplateHelper::getInstance($this, array('ui', JA_TOOL_SCREEN, JA_TOOL_MENU, JA_TOOL_COLOR, 'main_layout', 'direction'));
} else {
	$tmplTools = JATemplateHelper::getInstance($this, array('ui', JA_TOOL_SCREEN, JA_TOOL_MENU, 'main_layout', 'direction'));
}

//Calculate the width of template
$tmplWidth = '';
$tmplWrapMin = '100%';
switch ($tmplTools->getParam(JA_TOOL_SCREEN)) {
	case 'auto':
		$tmplWidth = '97%';
		break;
	case 'fluid':
		$tmplWidth = intval($tmplTools->getParam('ja_screen-fluid-fix-ja_screen_width'));
		$tmplWidth = $tmplWidth ? $tmplWidth.'%' : '90%';
		break;
	case 'fix':
		$tmplWidth = intval($tmplTools->getParam('ja_screen-fluid-fix-ja_screen_width'));
		$tmplWrapMin = $tmplWidth ? ($tmplWidth+1).'px' : '771px';
		$tmplWidth = $tmplWidth ? $tmplWidth.'px' : '770px';
		break;
	default:
		$tmplWidth = intval($tmplTools->getParam(JA_TOOL_SCREEN));
		$tmplWrapMin = $tmplWidth ? ($tmplWidth+1).'px' : '981px';
		$tmplWidth = $tmplWidth ? $tmplWidth.'px' : '980px';
		break;
}

$tmplTools->setParam ('tmplWidth', $tmplWidth);
$tmplTools->setParam ('tmplWrapMin', $tmplWrapMin);

//Main navigation
$ja_menutype = $tmplTools->getMenuType();
$jamenu = null;
if ($ja_menutype && $ja_menutype != 'none') {
	$japarams = new JParameter('');
	$japarams->set( 'menutype', $tmplTools->getParam('menutype', 'mainmenu') );
	$japarams->set( 'menu_images_align', 'left' );
	$japarams->set( 'menupath', $tmplTools->templateurl() .'/ja_menus');
	$japarams->set('menu_images', 1); //0: not show image, 1: show image which set in menu item
	$japarams->set('menu_background', 1); //0: image, 1: background
	$japarams->set('mega-colwidth', 200); //Megamenu only: Default column width
	$japarams->set('mega-style', 3); //Megamenu only: Menu style. 
	$japarams->set('rtl',($tmplTools->getParam('direction')=='rtl' || $tmplTools->direction == 'rtl'));
	$jamenu = $tmplTools->loadMenu($japarams, $ja_menutype); 
}	
//End for main navigation

$layout = $tmplTools->getLayout ();
if ($layout) {
	$tmplTools->display ($layout);
}
Can somebody help me out?


Thanks!


Locked

Return to “Templates for Joomla! 1.5”