Module Position Control

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/1/2010 9:48:35 AM
Gravatar
Total Posts 116

Module Position Control

Not sure whether this should be in the developer forum or the site admin forum as it will depend on the answer I get......

I was wondering whether it is possible to have more control over where modules are positioned (constant learning! ;-) ).  I know that at the moment the default system is very flexible and there are 3 content panes, generally I try to just use the middle pane and use css/html to position content which has been fine as up until now I have mainly been using the html and blog modules.

My understanding so far is that the modules are block level elements taking up the full width of the available space and can be positioned above or below one another within one pane of the page?  For the design I have in mind I would have a html block across the full width of the page at the top (below the header section) then 3 columns below that with the left and right one having html and the center one having a twitter profile module and I wondered what the best way of achieving this is?  

I have seen http://www.mojoportal.com/morethan3contentpanels.aspx and could probably do something along those lines but the problem is that the site will probably have a left hand vertical menu (no horizontal menu) which when I have used it before has gone into what is essentially the left hand pane so any modules added to the left hand pane appear beneath the menu so I would have to figure out a way around that (i.e. so that the menu is seperate to the rest of the site) - the ideal would be if all my content was positioned in the center pane and controlled via css but I'm not sure it is possible to add a module in this way - via a module link or some such - my longshot hope would be to be able to create the module on a hidden page (not in menu or sitemap) and maintain / adjust it from there but link and display it somewhere else...... longshot I know!! smiley

Advise on the right way to approach this would be much appreciated.

Regards

Andrew

9/1/2010 10:50:36 AM
Gravatar
Total Posts 2239

Re: Module Position Control

Hi Andrew,

I think I would do something like the markup below, I haven't test it but it should work okay.

<div id="wrapwebsite">
 <div id="wrapheader">
   <portal:SiteMenu id="SiteMenu1" runat="server" UseTreeView="false" HideMenuOnSiteMap="false" Direction="Horizontal" />
 </div>
 <asp:Panel ID="divAlt1" runat="server" CssClass="altcontent1">
   <asp:ContentPlaceHolder ID="altContent1" runat="server"></asp:ContentPlaceHolder>
 </asp:Panel>
 <div id="wrapcenter">
   <div id="wrappagemenu"><portal:PageMenu id="PageMenu1" runat="server" UseTreeView="true" Direction="Vertical" /></div>
     <asp:Panel id="divLeft" runat="server" cssclass="leftside" visible="True" SkinID="pnlPlain">
       <asp:contentplaceholder ID="leftContent" runat="server"></asp:contentplaceholder>
     </asp:Panel>
     <asp:Panel id="divCenter" runat="server" visible="True" cssclass="center-rightandleftmargins" SkinID="pnlPlain">
       <asp:ContentPlaceHolder ID="mainContent" runat="server"></asp:ContentPlaceHolder>
     </asp:Panel>
     <asp:Panel id="divRight" runat="server" visible="True" cssclass="rightside" SkinID="pnlPlain">
       <asp:contentplaceholder ID="rightContent" runat="server"></asp:contentplaceholder>
     </asp:Panel>
   </div>
   <asp:Panel ID="divAltContent2" runat="server" CssClass="altcontent2">
     <asp:ContentPlaceHolder ID="altContent2" runat="server"></asp:ContentPlaceHolder>
   </asp:Panel>
   <div id="wrapfooter">FOOTER CONTROLS HERE</div>
</div>

This should get you going. You'll have to figure out the CSS but that will not be too much different from the normal three column CSS that you have in all the other skins. Essentially, this should look like this picture:

4 Column Layout with 2 Horizontal Content areas

HTH,
Joe D.

9/1/2010 4:19:45 PM
Gravatar
Total Posts 116

Re: Module Position Control

Thanks Joe that's awesome and there will be a very well earned coffee on its way in the morning (UK time).

Its too late here to start doing too much with this now as I would get totally involved and not be getting much sleep!! lol

When you say markup do you mean to put this into the layout.master or into a html module.  If its into the layout.master how would I deal with pages that don't need the 3 columns (although I guess they would collapse if all content is inside the altcontent1 block.  If it were to be added to the html module how would the other modules be added into the correct areas.......

....... typing this out seems to have cleared my mind a little and I am thinking that I would add this into my layout.master and that any Placeholders not used will 'collapse'/not be visible - very much liking this idea and looking forward to getting it up and running as I think it will become my std layout to give me maximum flexibility on the pages smiley

Thanks once again Joe,

Will get that coffee sent over in the morning

Regards

Andrew

9/2/2010 5:45:55 AM
Gravatar
Total Posts 116

Re: Module Position Control

Is the 5contentpanes skin still kicking around somewhere - it doesn't seem to be listed in the 2.3.5.1 skins?

9/2/2010 7:00:56 AM
Gravatar
Total Posts 18439

Re: Module Position Control

Hi Andrew,

ramblingsoul-5contentpanes exists in the /Data/skins folder

there are some skins that have been moved to a separate download named extraskins.zip

Best,

Joe

9/2/2010 7:18:46 AM
Gravatar
Total Posts 116

Re: Module Position Control

Thanks Joe,

That looks pretty close to what I'm after, only thing I need to adjust is to make the vertical menu take up the whole of the height of the left hand side so that the top and bottom don't go above and below it and also make the left hand pane site next to it smiley  I mentioned to Joe D a few weeks ago that I keep having to remind myself of the standard stuff like masterpages/css etc and that they can be used (within some parameters) just as you would normally do within mojoportal - can't see the wood for the trees sometimes! lol

One other thing that I will have to address in some way, is there a best recommended way of using multiple page layouts within mojoportal i.e. effectively have the option of page templates for each page or page group - can this be achieved with nested masterpages or would it be best to use multiple skins where almost everything is the same except the postion(ing) of the content panes and possibly some css mods........ will start looking into that as I implement the site and see what seems to work best - having said that with empty panes collapsing it may turn out to be un needed...... one way to find out :-)

You must sign in to post in the forums. This thread is closed to new posts.