Page 1 of 1

Need help (again) modules and links

Posted: Fri Jul 31, 2009 9:52 am
by insight
OK, I'm thankful for all your help btw as I've been asking a lot of questions :P

Anyways I was wondering if anyone could help me with something. In my menu I'm allowing users to choose between a web link and a module as shown below:
Image
Now I'm creating a menu block and was wondering how I can add ONLY the web link if nothing was selected in the module or ONLY the module if nothing was selected in the web link?

For example. If a user selects a module (say News) and adds nothing to the web link then it will be outputted something like this:

Code: Select all

$url = "index.php?file=" . $module;
 
echo "<tr><td><a href=\"$url\">Home</a></td></tr>";
 
 
 
Or if the user enters a web link and nothing for the module then it will be outputted something like this:

Code: Select all

echo "<tr><td><a href=\"$link\">Home</a></td></tr>"; //$link = $fetchmu['weblink'];
 
 
And if nothing is entered in neither of them then there is no hyperlink, just plain text from the Title.