I have used this method many times with no problem, however, now I come to set it up with v.5 series I just cannot get it to work!
I have my usual toplist showing toplevel categories as a menu - no problem there. However, I want that to also show on non wsn pages so I do the following for javascript export...
To generate: export-menu|categories,priority;name,50,ascending,parent='0' ,,,0,0,0,0,0,0,,0
to file: menu.js
I call it: <script language="javascript" src="http://www.123photographs.co.uk/javascript/menu.js"> </script>
My export-menu.tpl...
<!-- BEGIN TOPLIST --> <CONFIG>categories,priority;name,50,ascending,parent ='0',,,0,0,0,0,0,0,,0</CONFIG> <li><a href="{CATURL}" title="{CATNAME}">{CATNAME}</a></l i> <!-- END TOPLIST -->
I also tried giving the toplist a number, but that didn't work.
I actually tried this for you and was getting the same thing as you. Then I looked at Paul's settings and noticed that his template name is exportmenu not export-menu. Took out the - and it worked for me. Give it a try see if that helps.
Oh, and I also noticed you have a semi-colon and not a comma after priority. Not sure if that makes a difference, but I've only seen commas in toplists.
Taking the hyphen out made it work! Obviously v.5 no longer likes that. I didn't think of that because Paul had said he had cut and pasted what I had put.
The semi-colon tells it that there are two sortings - first by priority and then by name.
Comments on Javascript Export
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I have used this method many times with no problem, however, now I come to set it up with v.5 series I just cannot get it to work!
I have my usual toplist showing toplevel categories as a menu - no problem there. However, I want that to also show on non wsn pages so I do the following for javascript export...
To generate: export-menu|categories,priority;name,50,ascending,parent='0' ,,,0,0,0,0,0,0,,0
to file: menu.js
I call it: <script language="javascript" src="http://www.123photographs.co.uk/javascript/menu.js"> </script>
My export-menu.tpl...
<!-- BEGIN TOPLIST -->
<CONFIG>categories,priority;name,50,ascending,parent ='0',,,0,0,0,0,0,0,,0</CONFIG>
<li><a href="{CATURL}" title="{CATNAME}">{CATNAME}</a></l i>
<!-- END TOPLIST -->
I also tried giving the toplist a number, but that didn't work.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Works fine for me copying and pasting what you wrote.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
[sigh] so why doesn't it for me!
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Try changing to in exporter.php.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
No, that doesn't seem to have worked
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Well, all I can say is that these settings produce this result.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
not for me!
I noticed that you didn't have all the commas and zeros after parent='0' so I removed them in case that was the problem, but it wasn't.
My menu.js file just shows...
document.write('');
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
babrees,
I actually tried this for you and was getting the same thing as you. Then I looked at Paul's settings and noticed that his template name is exportmenu not export-menu. Took out the - and it worked for me. Give it a try see if that helps.
Oh, and I also noticed you have a semi-colon and not a comma after priority. Not sure if that makes a difference, but I've only seen commas in toplists.
Good luck!
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
THANK YOU HAI !!
Taking the hyphen out made it work! Obviously v.5 no longer likes that. I didn't think of that because Paul had said he had cut and pasted what I had put.
The semi-colon tells it that there are two sortings - first by priority and then by name.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Ah. The - character is a directory separator for custom templates, same as /. Should never have worked.