Webmastersite.net
Register Log In

Question about custom layout

Comments on Question about custom layout

rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted May 06, 2006 - 12:52 PM:

The template thing is driving me nuts. I'd like to have a menu tree on the left side which looks like:

-Category 1
----Subcategory 1.1
----Subcategory 1.2
-Category 2
----Subcategory 2.1
-Cagegory 3
----Subcategory 3.1
----Subcategory 3.2

and so on... (- is a placeholder for blank spaces)

I have no problem with the main categories. But for some reason the subcategories always looks like Subcategory 1, Subcategory 2, Subcategory 3 on one line. How can I change this?
scriptwiki
Member

Usergroup: Customer
Joined: Aug 04, 2005

Total Topics: 11
Total Comments: 47
Posted May 06, 2006 - 1:04 PM:

I think you need do do this

change this

<!-- BEGIN SUBSUB -->
<a href="index.php?action=displaycat&catid={CATID}">{CATNAME}</a>,
<!-- END SUBSUB -->

to this

<!-- BEGIN SUBSUB -->
<a href="index.php?action=displaycat&catid={CATID}">{CATNAME}</a><br>
<!-- END SUBSUB -->
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted May 06, 2006 - 1:21 PM:

That's too simple scriptwiki. But thank you anyway!

I use tables for the menu tree and I know HTML very well. Of course I'm able to replace a comma with a <br>. But regardless what code I write for the subcategories, it seems it will be disregarded. And for some reason the source code of the site looks completely different from what I put into the template file.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted May 06, 2006 - 2:07 PM:

could you not place a site map there? Must admit I haven't used the site map facility yet though
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 06, 2006 - 3:55 PM:

You need to regenerate categories in order for changes to subcats on main page to apply.
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted May 08, 2006 - 2:55 AM:

Where do I have to do that?
If it's in the regenerate counters section, I already did it with no success.

Here's what I have in the template:

<!-- BEGIN CATSBODY -->
<table border="0">
<!-- BEGIN REGULAR -->
<tr>
<td width="20"><a href="index.php?action=displaycat&catid={CATID}" class="categoryname">
<img src="https://www.webmastersite.net/forums/templates/default/images/folder.gif" alt="{CATDESCRIPTION}"
width="16" height="16" border="0"></a></td>
<td colspan="2"><a href="index.php?action=displaycat&catid={CATID}" class="categoryname">{CATNAME}</a> ({CATNUMLINKS}) {CATHASNEW} {CATADMIN}</td>
</tr>
<!-- BEGIN SUBSUB -->
<tr>
<td width="20"> </td>
<td width="20"><a href="index.php?action=displaycat&catid={CATID}">
<img src="https://www.webmastersite.net/forums/templates/default/images/folder.gif" alt="{CATDESCRIPTION}"
width="16" height="16" border="0"></a></td>
<td><a href="index.php?action=displaycat&catid={CATID}">{CATNAME}</a></td>
</tr>
<!-- END SUBSUB -->
<!-- END REGULAR -->
</table>
<!-- END CATSBODY -->


and here's what I get in the source code:

<!-- BEGIN CATSBODY -->
<table border="0">
<tr><!-- BEGIN REGULAR -->
<tr>
<td width="20"><a href="http://www.mydomain.ch/wsn/Category1" class="categoryname">
<img src="http://www.mydomain.ch/wsn/templates/multilingual/images/folder.gif" alt=""
width="16" height="16" border="0"></a></td>
<td colspan="2"><a href="http://www.mydomain.ch/wsn/Category1" class="categoryname">Category1</a> (0) <a href=edit.php?action=category&field=id&condition=equals&fieldvalue=16><img src=http://www.mydomain.ch/wsn/templates/multilingual/images/edit.gif border=0></a></td>
</tr>
<!-- END SUBSUB -->
</tr><tr><!-- BEGIN REGULAR -->
<tr>
<td width="20"><a href="http://www.mydomain.ch/wsn/Category2" class="categoryname">
<img src="http://www.mydomain.ch/wsn/templates/multilingual/images/folder.gif" alt=""
width="16" height="16" border="0"></a></td>
<td colspan="2"><a href="http://www.mydomain.ch/wsn/Category2" class="categoryname">Category2</a> (274) <a href=edit.php?action=category&field=id&condition=equals&fieldvalue=1><img src=http://www.mydomain.ch/wsn/templates/multilingual/images/edit.gif border=0></a></td>
</tr>
<a href="http://www.mydomain.ch/wsn/Category2/Subcategory2.1">Subcategory2.1</a>,

<a href="http://www.mydomain.ch/wsn/Category2/Subcategory2.2">Subcategory2.2</a><!-- END SUBSUB -->
</tr><tr><!-- BEGIN REGULAR -->
<tr>
<td width="20"><a href="http://www.mydomain.ch/wsn/Category3" class="categoryname">
<img src="http://www.mydomain.ch/wsn/templates/multilingual/images/folder.gif" alt=""
width="16" height="16" border="0"></a></td>
<td colspan="2"><a href="http://www.mydomain.ch/wsn/Category3" class="categoryname">Category3</a> (2) <a href=edit.php?action=category&field=id&condition=equals&fieldvalue=7><img src=http://www.mydomain.ch/wsn/templates/multilingual/images/edit.gif border=0></a></td>
</tr>
<!-- END SUBSUB -->
</tr><tr><!-- BEGIN REGULAR -->
<tr>
<td width="20"><a href="http://www.mydomain.ch/wsn/Category4" class="categoryname">
<img src="http://www.mydomain.ch/wsn/templates/multilingual/images/folder.gif" alt=""
width="16" height="16" border="0"></a></td>
<td colspan="2"><a href="http://www.mydomain.ch/wsn/Category4" class="categoryname">Category4</a> (496) <a href=edit.php?action=category&field=id&condition=equals&fieldvalue=9><img src=http://www.mydomain.ch/wsn/templates/multilingual/images/edit.gif border=0></a></td>
</tr>
<a href="http://www.mydomain.ch/wsn/Category4/Subcategory4.1">Subcategory4.1</a>,

<a href="http://www.mydomain.ch/wsn/Category4/Subcategory4.2">Subcategory4.2</a>,

<a href="http://www.mydomain.ch/wsn/Category4/Subcategory4.3">Subcategory4.3</a>,

<a href="http://www.mydomain.ch/wsn/Category4/Subcategory4.4">Subcategory4.4</a><!-- END SUBSUB -->
</tr><tr><!-- BEGIN REGULAR -->
<tr>
<td width="20"><a href="http://www.mydomain.ch/wsn/Category5" class="categoryname">
<img src="http://www.mydomain.ch/wsn/templates/multilingual/images/folder.gif" alt=""
width="16" height="16" border="0"></a></td>
<td colspan="2"><a href="http://www.mydomain.ch/wsn/Category5" class="categoryname">Category5</a> (4) <a href=edit.php?action=category&field=id&condition=equals&fieldvalue=8><img src=http://www.mydomain.ch/wsn/templates/multilingual/images/edit.gif border=0></a></td>
</tr>
<!-- END SUBSUB -->
</tr><tr><!-- BEGIN REGULAR -->
<tr>
<td width="20"><a href="http://www.mydomain.ch/wsn/Category6" class="categoryname">
<img src="http://www.mydomain.ch/wsn/templates/multilingual/images/folder.gif" alt=""
width="16" height="16" border="0"></a></td>
<td colspan="2"><a href="http://www.mydomain.ch/wsn/Category6" class="categoryname">Category6</a> (7) <a href=edit.php?action=category&field=id&condition=equals&fieldvalue=2><img src=http://www.mydomain.ch/wsn/templates/multilingual/images/edit.gif border=0></a></td>
</tr>
<a href="http://www.mydomain.ch/wsn/Category6/Subcategory6.1">Subcategory6.1</a>,

<a href="http://www.mydomain.ch/wsn/Category6/Subcategory6.2">Subcategory6.2</a><!-- END SUBSUB -->
</tr>
</table>
<!-- END CATSBODY -->


So it looks quite different.
damon
Member

Usergroup: Customer
Joined: Oct 14, 2005
Location: Singapore

Total Topics: 11
Total Comments: 31
damon
Posted May 08, 2006 - 6:04 AM:

maybe can try regenerate everything? under regenerate counter...
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 08, 2006 - 6:13 PM:

Regenerate categories is an option (the 2nd I believe) under maintinence->regenerate counters. In 3.3.17 you are automatically stopped and given a link to it when you change that html.
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
Posted May 09, 2006 - 3:43 AM:

Okeydokey, now it works.

I previously made the menu tree in a new custom template and for some reason the regeneration didn't work. Now I made the same changes to the default main index template, and the regeneration worked!
rolij
Member

Usergroup: Customer
Joined: May 19, 2005

Total Topics: 18
Total Comments: 42
rolij
#10 - Quote - Permalink
Posted May 21, 2006 - 11:41 AM:

Well, after I did another 'regenerate counters' the menu tree looks bad again. I don't understand this category menu thing. Why is it one time correct and after a regeneration it's uncorrect again and if I just copy and paste the code out of the template and in again and regenerate counters again then it's okay again until I do another regeneration. It's driving me nuts!
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.