Need help (again) modules and links
Posted: Fri Jul 31, 2009 9:52 am
OK, I'm thankful for all your help btw as I've been asking a lot of questions 
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:

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:
Or if the user enters a web link and nothing for the module then it will be outputted something like this:
And if nothing is entered in neither of them then there is no hyperlink, just plain text from the Title.
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:

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>";
Code: Select all
echo "<tr><td><a href=\"$link\">Home</a></td></tr>"; //$link = $fetchmu['weblink'];