Topic: [Template] Andreas02  (Read 12007 times)

Pages: [1]   Go Down

#1: 3-Nov-2005, 03:39 AM

Coding Team

sottwell
Posts: 10,530

WWW
This is a nice template.  A few things to take note of:

There are three separate menus.  At the very top is a menu which can be used for external links, or dividing the internal installation of MODx into different virtual sites, for example a multilanguage site.

In the case of a list of external links, it should use an unpublished (or not shown in menu) folder of weblinks.  In the case of internal virtual sites, set the DropMenu snippet there to use 0.  Each folder in the root of the Tree will contain the virtual site.  There are a number of ways to control the main menu in that case, for example see http://modxcms.com/forums/index.php/topic,409.0.html for one method.

The main menu is a single-level list.  Any submenus are displayed in a sidebar menu.  In these circumstances, you cannot use an empty folder to contain a submenu.  All of the main menu items must be linkable documents, with content and a template.

The submenus are preceded by a little snippet that determines if there will be any submenu items.  If there are, it displays a menu header. 

You will most likely want to replace the text in the template with chunks containing your own content.  It's better to use chunks and keep text out of the template, not only to keep your template code clean and obvious, but also so you can use the same chunks of content in other templates and only need to make changes to the chunk, not to every template.



* Andreas02.jpg (17.82 KB, 200x117 - viewed 5587 times.)
* Andreas02.zip (101.63 KB - downloaded 1378 times.)
« Last Edit: 3-Nov-2005, 11:45 AM by sottwell »
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#2: 3-Nov-2005, 08:14 AM

Coding Team

sottwell
Posts: 10,530

WWW
There is an issue with the sidebar menu if it has multiple levels.  I'm working on it, and will attach the snippet to use as soon as it's all finished.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#3: 3-Nov-2005, 11:48 AM

Coding Team

sottwell
Posts: 10,530

WWW
Ok, the template has been corrected to properly handle the sidebar submenus.  It no longer adds a heading to the menu.  The snippet used to set the correct startDoc id is included in the updated download attached to the first post.  It is also being released in the Snippets etc. forum.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#4: 10-Nov-2005, 11:03 PM

stupid
Posts: 30

Just a quick query, probably a stupid CSS question, but I'm having trouble with the formatting of the top menu bar, In Firefox, it overlaps the img by approx 1 pxl, and in IE (god I hate having to deal with IE) there is about a 4 or 5 pxl Gap between the top menu and the img.

Any suggestions would be greatly appreciated!

#5: 11-Nov-2005, 12:43 PM

Coding Team

sottwell
Posts: 10,530

WWW
Yes, the issue is the CSS.  All I can suggest is fiddle the CSS until it looks good.  I often have to put a conditional style block in the template to handle IE.  There are "hacks" for it, but they usually depend on bugs in IE that they fix so the hacks don't work any more, but the problem you used the hacks to fix are still there!

I'll load it up in IE tomorrow morning, and see what needs to be done to fix it.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html

#6: 11-Nov-2005, 01:10 PM

Coding Team

Dr. Scotty Delicious
Posts: 1,192

D.F.P.A.

WWW
Ahh... The dreaded style with IE.  The problem:  your page looks great in every browser... except, IE screws with your beautiful positioning.  Especially noticeable if you use "float:" in your CSS.  Rumored to be repaired in IE7, IE6 and below are still riddled with problems involving web-standard CSS1 positioning classes.  The easiest (and most universal) fix I have found is a conditional comment with style info:

http://www.quirksmode.org/css/condcom.html

I use this for the margins on my lists ( The subNavigation section ) on my website.

-sD-
scotty Delicious

#7: 21-Nov-2005, 04:44 PM

stupid
Posts: 30

Cheers Scotty,

Yeah that conditional sorted me out, just tweaked the bottom margin to -7px in the CSS and in the   IE conditinal set it to -14px and all is now right with the world. Apart from IE as nothing will ever be right with that browser it would seem ^_^

Thanks again.

#8: 25-Apr-2006, 02:55 PM

DNA
Posts: 130

#Edit#
« Last Edit: 26-Apr-2006, 07:11 AM by DNA »

#9: 22-Aug-2006, 03:16 PM

sophietje
Posts: 13

How to get the menu in the sidebar working? I can't get it right with the css provided. It shows an ordinary list instead of the markup that is assigned to the sidemenu....
I don't use the Ultimate Parent snippet from the zipfile, I use the snippet that was already in my MODX.

#10: 22-Aug-2006, 03:44 PM

Coding Team

sottwell
Posts: 10,530

WWW
Do View Source on your page, and check the id or class names for the containers (div or ul) for the menu. You'll need to adjust the CSS to match those.
sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.