Topics Pages

On my Useful Links page, I’ve got all my links sorted into topics. At the moment, all the topics are listed vertically and it doesn’t look too good.



What I want, which I’ve seen on other sites, is to have the topics arranged horizontally and more spaced out, to look neater and more professional.



Would anyone know how I might do this?



Here’s my Useful Links page: [url]http://www.moonrust.co.uk/useful-links.html[/url]

Here is a screen shot of what I mean.



What I want is rather than a vertical list of useful links, I’d like the list to be horizontal.



I just think it would look better, but have no idea how to make it happen. :confused:

Image.jpg

In “topics_pages/topics.tpl”



REPLACE


```php

{if $subtopics}






{foreach from=$subtopics item=topic}
{$topic.topic}

{/foreach}

{/if}
```WITH

```php
{if $subtopics}
{assign var="columns" value="3"}
{split data=$subtopics size=$columns assign="splitted_subtopics"}

{foreach from=$splitted_subtopics item=ssubtopic}

{foreach from=$ssubtopic item=topic}
{math equation="floor(100/c)" assign="cell_width" c=$columns}

{/foreach}

{/foreach}
{$topic.topic}

{/if}
```

Fantastic, thanks Matt.



That was exactly what I was looking for.



I’ve attached another screen shot of what my useful links directory page looks like now. :smiley:

Image2.jpg

I spoke too soon… :rolleyes:



I’ve just noticed that on IE, my useful links directory page doesn’t look the same as it does in FF.



The list is aligned right and all titles with two words in them are laid out on two lines, making the page look a bit weird.



Any ideas?

Image3.jpg

Try replacing



{$topic.topic}




{$topic.topic}

Still no joy I’m afraid (I hate IE). :confused:

Can anyone help with this IE problem?



(Why doesn’t everything work like FF?)

Sorry to bump this again, but I still can’t figure out how to get my Links menu to look the same on IE as it does on FF.



If anyone can help, I’d be very grateful. :confused:

Isn’t that line missing a couple of [COLOR=“Red”]%[/COLOR]

```php

{$topic.topic}
```

Actually you should be able to get rid of
```php
style="width:{$cell_width}%"
```

Yeah, that should be it. Thanks.

Thanks Charlie and Matt, you’ve cracked it.



The page looks the same on IE now, PHEW!! :mrgreen:



What would I do without the help of people like you?

Glad you got it sorted, but Matt done the hard work.