Menu Listing
8 posts by 2 authors in: Forums > CMS Builder
Last Post: June 24, 2008 (RSS)
By merid - June 23, 2008
Here is a quick question. I have the following design site.
http://www.05.meridianwebdesign.com/about-us.php
The about us landing page is linked through an image. I have to use the first record in the database so it will appear in the detail portion.
The problem is that the about us menu has to appear twice. How can I hid the first text navigation text about us so that the menu is left with just the image menu link?
Thanks.
Rolly
Re: [merid] Menu Listing
By Dave - June 23, 2008
We just need to find something unique about that situation that can test for. It looks like all the sub menu options have a number on the end of the url (that's what we use to lookup the record).
What if we wrap the sub menu options in this so they only display when there is a number on the end of the url?
<?php if (getNumberFromEndOfUrl()): ?>
... sub menu options ...
<?php endif ?>
Let me know if that works for you.
interactivetools.com
Re: [Dave] Menu Listing
By merid - June 23, 2008
I tried putting the if statement in 2 places. Here is the last I got:
<?php foreach ($contact_usRecords as $record): ? >
<tr>
<td width="11%"><img src="images/clear.gif" / height="2" width="22"></td>
<td width="89%" align="left"><img src="images/clear.gif" / height="4"><br />
<?php if (getNumberFromEndOfUrl()): ?><a href="<?php echo $record['_link'] ?>"><font color="#FFFFFF"><?php echo $record['title'] ?></font></a><?php endif ?><br/>
</td>
</tr>
<?php endforeach; ?>
<?php if (!$contact_usRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
Result: The other submenu did not appear too. http://www.05.meridianwebdesign.com/contact-us.php .
I tried putting it after the foreach. The same result.
Re: [merid] Menu Listing
By Dave - June 23, 2008
I just had a look at the link you sent. Is it working the way you want it to now? Looks like you beat me to it! Let me know if you need any more help with that.
interactivetools.com
Re: [Dave] Menu Listing
By merid - June 23, 2008
Rolly
Re: [merid] Menu Listing
By Dave - June 24, 2008
http://www.05.meridianwebdesign.com/contact-us.php?Directions-Map-2
Can you use the same code as worked for the other main menu options?
interactivetools.com
Re: [Dave] Menu Listing
By merid - June 24, 2008
http://www.05.meridianwebdesign.com/contact-us.php
where all the submenus are gone.
What I wanted is the following but without the "contact us" submenu appearing to avoid repeating it:
http://www.05.meridianwebdesign.com/contact-ustest.php
Thanks.
Rolly
Re: [merid] Menu Listing
By Dave - June 24, 2008
What if we tested for if the url contained "contact-us" and showed it open with sublinks in that case? Would that work?
This code will test for that:
<?php if (strpos($_SERVER['SCRIPT_NAME'], "contact-us")): ?>
...
<?php endif; ?>
Hope that helps.
interactivetools.com