Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Creating Menus - Am I doing something wrong?

Thank you to all the posters who help point me in the correct direction to my earlier queries on creating Menus with City Desk.

Here are the steps I have take.

In Designer Mode>>>

I have created a new Variable "mainMenu" and added the Values "Page1" and "Page2".

I am assuming that this is where I add items for the menu.

Next, I went to templates and edited the default 'Simple' template.

I added {$ .mainMenu$} to the 'Simple' template.

Now when I preview a page, "Page1" and "Page2" appears exactly where I inserted  {$ .mainMenu$} into the 'Simple' template.

Would this be a correct approach?

How do I add the links to "Page 1" and "Page 2"?

Thanks for your help.

Aleks

Aleks
Monday, July 14, 2003

There are so many ways. (This isn't the best way to do a menu. It's better to use a script that will automatically generate menus when you add pages. But, you have to start somewhere.)

To follow up what you are doing, it might be best to put the menu in the template.

1. Type "Page 1" and "Page 2"
2. Highlight the "Page 1" and click the link button, pick an article and insert the link. Do the same for "Page 2"
3. The trouble with this is that when you create Page 2, you'll have to add it to the template. If you create a new template, you'll have to include the links.

If you want to pursue using {$ .mainMenu$} as a variable, you'll need to do steps 1 and 2 to create the links but do them in a work article instead of the template. That is, you'll use an article just to create the links and the HTML for the links. You'll use the HTML for your menu variable.

Create the links. Change to html view and use the html for the links as the value of {$ .mainMenu$}

So the value of  {$ .mainMenu$}  will look like this

<a href="http://Page1URL">Page 1</a> <a href="http://Page2URL"> Page 2</a>

{$ .mainMenu$} is better than putting the menu links into the template. But, you really need to learn how to do with a script.

tk
Tuesday, July 15, 2003

*  Recent Topics

*  Fog Creek Home