Home › Forums › General XMetaL Discussion › relative paths in css files › Reply To: relative paths in css files
Reply to: relative paths in css files
November 26, 2010 at 8:08 amThanks for your reply.
The problem is a bit more tricky and our XMAX is behaving a little bit different from what you've explained. We have a folder in which we put the to be opened xml file and the xac file. The problem is that XMAX decompresses the xac file in a totally different folder (in the “local settings” folder inside the “documents and settings” folder). But we have already found a workaround to that problem:
1. we've defined a “variable” inside the css file for the path to the images (css doesn't support variables so we've just put the String “LOGO_PATH” into “$” signs — $LOGO_PATH$).
2. the XMAX scripting api gives access to the styles defined inside the css file. So on the “ON_DOCUMENT_OPEN_COMPLETE” event we parse the css file and exchange all occurences of the “variable” with the actual path.
So far that's just the theory. I am not through with the implementation. I will let you know if it works.
Greetings,
rewers.