Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Inheriting variables in subcatalog config file



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting Jean-Philippe Bouchard (jeanphil@sitepak.com):
> 
> Hello,
> 	I don't know if it was meant this way or if I'm doing something wrong.
> I'm trying to access catalog.cfg variables in subcatalog.cfg. 
> 
> Here's an example:
> in catalog.cfg:
> [...]
> Variable CAT_VAR value
> [...]
> 
> in subcatalog.cfg (this subcatalog being based on catalog):
> [...]
> ParseVariables Yes
> Variable SUBCAT_VAR __CAT_VAR__/dir
> ParseVariables No
> [...]
> 
> I end up with __SUBCAT_VAR__ containing only /dir instead of value/dir
> as expected...
> Thanks for your help

Not possible to do. The SubCatalog knows nothing about the parent
until the configuration is complete. There is no real easy way
to change this, unfortunately.

In Minivend 4, one way to help a bit is if you have some key variables
you want to set; include it in a common configuration file:

#include common_vars.cfg
ParseVariables Yes
Variable SUBCAT_VAR __CAT_VAR__/dir
ParseVariables No

Don't do this for too much stuff or the subcatalog becomes too large
to be efficient.

There are also some neat things you can do with tied configuration
variables; you would need to see the CATALOG.CFG section in the
minivend docs.

-- 
Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>

I have a cop friend who thinks he ought be able to give a new ticket;
"too dumb for conditions".
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: