View Full Version : Formatting lists
RPMiller
Apr 6th, '03, 12:37 PM
Dan,
I can not seem to get the IFLIST or IS_LIST tags to format a list as italicized. It just displays the tags instead. Do I have to use these tags in a character template instead of the export template?
I'm still trying to get a list on the Martial Arts tab to display as italicized. Essentially the same as name does.
Simon
Apr 6th, '03, 12:47 PM
You use the tags in the export template. They have no meaning whatsoever in a character template.
To give an example, let's say you want the ALIAS value of a list to be italisized and for any items in a list to be indented (assuming an html format) -- I'll leave out the tag formatting and just give the tag names in all-caps:
IFPERKS
This is the Perks header
PERKS
PERK_COST
IS_LIST<i>/IS_LIST
IFLIST<div style="margin-left: 15px;">LISTPREFIX<span style="padding-left: 10px;">/IFLIST
PERK_TEXT
IFLIST</span></div>/IFLIST
IS_LIST</i>/IS_LIST
/PERKS
/IFPERKS
Simon
Apr 6th, '03, 12:52 PM
To elaborate/explain the above a bit:
What the export template is doing is saying that if the item is a List (this can be a List, MP, EC, or VPP), then put in an opening italics tag, then the "text" of the item (the name), and then a closing italics tag.
Additionally, it says that if the item is a "list member" (i.e. part of a list, but not the List itself), then indent the item, print out the list prefix, give a little more indentation, and then print the text of the item.
If the item is neither a List nor a List member, then just print out the text of the item.
IS_LIST and IFLIST should always be mutually exclusive....You can't have a List within a List. If "IFLIST" evaluates to true, then you are dealing with a List member, which cannot itself be a list. If "IS_LIST" evaluates to true, then you are dealing with a List definition, which cannot be contained by any other List.
Hopefully this all makes sense....Let me know if not and I'll try to explain further.
RPMiller
Apr 6th, '03, 02:39 PM
Ok, here is what I have:
<!--IFMARTIAL_ARTS-->
Martial Arts Heading
<--MARTIAL_ARTS-->
<--MA_COST-->
<--IS_LIST>\i<--/IS_LIST>
<--MA_TEXT-->
<--IS_LIST>\i0<--/IS_LIST>
<--/MARTIAL_ARTS-->
<--/IFMARTIAL_ARTS-->
(The \i and \i0 are RTF formatting tags.)
Here is what it gives me:
Maneuver OCV DCV Notes
<--IS_LIST><--/IS_LIST><i>Martial Arts: Muay Thai</i><--IS_LIST><--/IS_LIST>
4 <--IS_LIST><--/IS_LIST><i>Block: 1/2 Phase, +2 OCV, +2 DCV, Block, Abort</i><--IS_LIST><--/IS_LIST>
Any ideas?
Simon
Apr 6th, '03, 03:19 PM
Well...
Note that the format is not <--IS_LIST--> ... it's <!--IS_LIST--> (pay attention to the '!"...it's important).
All that the export process does is to swap out that value. If the item in question is a list, it leaves anything between the beginning (<!--IS_LIST-->) and ending (<!--/IS_LIST-->) tags in place (removing the tags themselves). If the item is not a list, it replaces everything from the beginning to the ending tag (inclusive) with an empty string.
I suspect that your problem is due to poor formatting of the tags themselves (it looks like you're using <--IS_LIST--> rather than <!--IS_LIST-->).
RPMiller
Apr 6th, '03, 04:08 PM
Originally posted by dsimon
Well...
Note that the format is not <--IS_LIST--> ... it's <!--IS_LIST--> (pay attention to the '!"...it's important).
All that the export process does is to swap out that value. If the item in question is a list, it leaves anything between the beginning (<!--IS_LIST-->) and ending (<!--/IS_LIST-->) tags in place (removing the tags themselves). If the item is not a list, it replaces everything from the beginning to the ending tag (inclusive) with an empty string.
I suspect that your problem is due to poor formatting of the tags themselves (it looks like you're using <--IS_LIST--> rather than <!--IS_LIST-->). Yes that is what I have. I left out the ! to be lazy with posting, but they are in my code. It looks to me like that tag isn't behaving properly in the Martial Arts section. I'm going to do a littl emore testing.
Also, notice that the formatting is taking, but it is applying it to everything, not just lists.
RPMiller
Apr 6th, '03, 05:19 PM
Originally posted by Durnin
I'm going to do a little more testing. Ok, I tested what I had by doing it in an HTML Template. It works beautifully. There must be something that RTF doesn't like about those tags for some reason. Time for some more investigating...
Simon
Apr 6th, '03, 06:08 PM
Let me know what you find. Those tags should not be present in the final output....if they are, it's something that I need to fix.
RPMiller
Apr 6th, '03, 06:34 PM
Originally posted by dsimon
Let me know what you find. Those tags should not be present in the final output....if they are, it's something that I need to fix. I've tried several permutations, and every one of them has failed. I have tried moving the tags to different locations, in different containers, and everytime they have no effect other than being present in the final export. I haven't tried all the tags, so I don't know if others are causing the same problems. All the ones I have used except the list ones have been fine. Let me know if you would like me to try something specific.
Simon
Apr 7th, '03, 01:09 AM
Originally posted by Durnin
I've tried several permutations, and every one of them has failed. I have tried moving the tags to different locations, in different containers, and everytime they have no effect other than being present in the final export. I haven't tried all the tags, so I don't know if others are causing the same problems. All the ones I have used except the list ones have been fine. Let me know if you would like me to try something specific.
Email me a copy of the export template that you're trying. I'd like to play with it a bit and see what I can find.
support@herodesigner.com
RPMiller
Apr 7th, '03, 08:57 AM
Originally posted by dsimon
Email me a copy of the export template that you're trying. I'd like to play with it a bit and see what I can find.
support@herodesigner.com I'm at work right now so I don't have the file, but I'll send it to you as soon as I get home. You could also try this one (http://www.herogames.com/forums/showthread.php?s=&threadid=2394) that I posted. It is the previous version to the one I have now. The most current includes the IF_END tags. Thank you very much for those by the way!
RPMiller
Apr 8th, '03, 01:56 PM
Dan,
I discovered something interesting regarding the IS_LIST tag. If I put the IFLIST tag inside it, I know you shouldn't, it won't display the IS_LIST, but it will display IFLIST. Not sure why IS_LIST is showing up unless this is done. I'll be sending you my template this evening.
Powered by vBulletin® Version 4.2.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.