nycat
Jan 14 2009, 09:01 AM
Hi,
I am new to MT and a little bit stumped here. On the index.html template, I'd like to do the following:
< If template module named "Primary Nav" exists >
then output the following statements
< else >
output something else.
Should I use mt:If? what comes after that? Tried <mt:If module="Primary Nav"> and that didn't work.
Thank you!
blog-coding-is-fun
Jan 15 2009, 07:27 AM
Hello.
Not to side-track from your actual question, but that's sounds like an odd thing to do, particularly for a beginner or near-beginner. If the text you want to conditionally include is next to or in your 'Primary Nav' element, then it seems it would be best to put it in that module, no?
And if you're templating your own site, don't you know that this module exists? Sorry if that sounds really dumb, but seems to me that checking for a module's existence is the sort of careful check you'd make if you're creating a plugin or a style for distribution, and you want to do a dutiful check for the plugin/style's presence.