Don't want the "locator" to be visible!

General questions about CMSimple
patrisch
Posts: 10
Joined: Tue Jul 07, 2009 9:08 pm

Re: Don't want the "locator" to be visible!

Post by patrisch » Sat Jul 11, 2009 2:25 pm

Yes, I know, but where to put the line ... That's the problem for me ... I'm sorry for that, but I think I learned a lot until now because of your help.

There's just one last thing I would want to know.

Applying your margin-tip I got to this result:

[ external image ]

Now here's the question:

How can I define the position of the small icons? I want them to be over each menu point, not on the left of them. Changing the icon via changing the img src won't be the problem. Maybe you can show to me, at which place I should put my code. Later on I will replace the small BMW - icons with bigger ones of some of their cars.

Thanks a lot (again)!

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Don't want the "locator" to be visible!

Post by Tata » Sat Jul 11, 2009 3:33 pm

Oh, that won''t be that easy at all. If am I wrong, please correct me. But making the menu this way is not the right philosophy of CMSimple. The philosophy is to generate the menuautomatically with writing pages. But if you don't expect to extend the pages very often, you may run your page even without the CMSimple-based menu removing the toc() function).
But there is still one way how this could be made. However, it would be as if you go visit your friend and fly allover the globe to knock neighbour's door.
  1. create a hidden page only with a picture and with the menu-text below it. Name the page e.g. page_01
  2. Make a HIDDEN page named Page_01 and add any desired content to it.
  3. now link the picture and the text below it on page_01 to Page_01. Within the IMG tag you may use also the rollover script.
  4. remove the toc() function from your template (not necessary if all pages are hidden) and replace it by newsbox('Page_01') function
Repeat this for any menu item you need.
I have no time to test it. But it might work. If you deside to have some pages without pictures in menu, add them after or before all hidden pages. In stylesheet.css you shall oucomment background-image for doc,docs,sdoc and sdocs classes and maybe also play with the padding in menulevels.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: Don't want the "locator" to be visible!

Post by mvwd » Sat Jul 11, 2009 9:35 pm

...ehm, sorry Tata. But this is not right!

The whole menu can be styled via CSS, including the background-images, as patrisch did. Using another menufunction like xtoc() allows additional to style each menu-item individual, cause it inserts a individual CSS-class for each menu-item.

For your example, something like that will place the BMW-icon in top of the menu-link and keeps the icon clickable:

Code: Select all

ul.menulevel1,
ul.menulevel1 li {
	margin:0;
	padding:0;
}
ul.menulevel1 li {
	background:url(./menu/bmw-icon.gif) top left no-repeat #fff;
	margin:4px;
}

ul.menulevel1 li a {
	display:block;
	padding:4px;
	padding-top:40px;
}
...placed in Stylesheet. Logical, isn't it? But make sure, that xtoc() generates clickable links of each menu-item, including the one, which is currently active.

This one will make the text only clickable, the icon is just for decoration:

Code: Select all

ul.menulevel1,
ul.menulevel1 li {
	margin:0;
	padding:0;
}
ul.menulevel1 li {
	background:url(./menu/bmw-icon.gif) top left no-repeat #fff;
	margin:4px;
	padding-top:40px;
}
Using xtoc()'s CSS-Classes in your example can be used with e.g.:

Code: Select all

 ul.menulevel1 li.Termine {
	background:url(./menu/bmw-z3.gif) top left no-repeat #fff;
}
Link for learning more about CSS: http://de.selfhtml.org/css/eigenschafte ... rgrund.htm

mvwd.

CMSimple-Styles.com
Posts: 342
Joined: Thu Jun 26, 2008 8:19 pm
Location: Germany
Contact:

Re: Don't want the "locator" to be visible!

Post by CMSimple-Styles.com » Tue Jul 14, 2009 1:15 pm

Yes thats true, with XTOC its possible, but with the standard toc not. I think TATAs method is simpler to set up. I used it on some sites because its simpler to understand for the users not familar with CSS.

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Don't want the "locator" to be visible!

Post by Tata » Tue Jul 14, 2009 6:26 pm

CMSimple-Styles.com wrote:it's simpler to understand for the users not familar with CSS.
This exactly was my point. Things can be made with the very basic functions (which is never as perfect and simple as if made with advanced features of CMSimple) or they can be made very precisely and absolute CMSimpleconform, but this requires very good experience with CMSimple and especially with CSS.
Some of attributes are never visible in the template (they are loaded on background by cms.php, by plugins etc.). This may be confusing for an unadvanced user. In this case the only way of "study" is the "try&fail" the only way to discover the principles. And this takes mostly much more time than a little complicated or even a primitive way of solving a problem with the basic "grammar".
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply