How to find out whether index_html was acquired?
I'm wondering whether there is a way to determine whether the index_html method was found in the current folder or was acquired from a folder above. The motivation for this is a situation like so: Suppose there is a folder 'Acme' with subfolders 'Engineering', 'Marketing' and 'Accounts'. I'd like the index_html for the subfolders to be similar, so I would put it in Acme to be acquired. However I want the index_html for the Acme folder itself to be different from the subfolders. Therefore I'm thinking I could rename the index_html for the subfolders to be index_sub_html, create an index_self_html for use by the Acme folder, and then have index_html determine whether it was acquired and show either index_self_html or index_sub_html as appropriate. Would this be the right approach? Hamish Lawson
Hamish Lawson writes:
I'm wondering whether there is a way to determine whether the index_html method was found in the current folder or was acquired from a folder above. This means, you ask the current folder whether is has an "index_html". You can do this with the followin Python script "hasItem":
argments: id try: context[id]; return 1 except KeyError: return 0 Dieter
participants (2)
-
Dieter Maurer -
Hamish Lawson