Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Menu Listing

 

 


merid
User

Jun 23, 2008, 10:50 AM

Post #1 of 8 (338 views)
Shortcut
Menu Listing Can't Post

Hi Dave,

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


Dave
Staff / Moderator


Jun 23, 2008, 1:16 PM

Post #2 of 8 (330 views)
Shortcut
Re: [merid] Menu Listing [In reply to] Can't Post

Hi Rolly,

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.

Dave Edis - Senior Developer
interactivetools.com


merid
User

Jun 23, 2008, 2:32 PM

Post #3 of 8 (324 views)
Shortcut
Re: [Dave] Menu Listing [In reply to] Can't Post

Thanks Dave.

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.


Dave
Staff / Moderator


Jun 23, 2008, 3:43 PM

Post #4 of 8 (309 views)
Shortcut
Re: [merid] Menu Listing [In reply to] Can't Post

Hi Rolly,

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.

Dave Edis - Senior Developer
interactivetools.com


merid
User

Jun 23, 2008, 3:53 PM

Post #5 of 8 (308 views)
Shortcut
Re: [Dave] Menu Listing [In reply to] Can't Post

No Dave. It is not working yet. There is supposed to be a submenu entitled "Directions & Map" but it is not showing. Apparently, the if statement did not work. "Direction & Map" has a number at the end of the url yet it did not show. It is supposed to be the second submenu. My problem I think is the pinpointing where to add the If statement.

Rolly


Dave
Staff / Moderator


Jun 23, 2008, 10:50 PM

Post #6 of 8 (289 views)
Shortcut
Re: [merid] Menu Listing [In reply to] Can't Post

Is that under Contact Us? Is that the last one that isn't working? It looks like it's backwards. All the other menus are closed until you click on them and then they pop open. But Contact Us isn't, but if you link with a number it opens up:

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?

Dave Edis - Senior Developer
interactivetools.com


merid
User

Jun 24, 2008, 8:58 AM

Post #7 of 8 (260 views)
Shortcut
Re: [Dave] Menu Listing [In reply to] Can't Post

Yes, I am talking about "Contact Us" Dave. I inserted the code and I got this

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


Dave
Staff / Moderator


Jun 24, 2008, 9:11 AM

Post #8 of 8 (258 views)
Shortcut
Re: [merid] Menu Listing [In reply to] Can't Post

Is the code for the menu duplicated on each of those pages or from a common include file.

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:

Code
<?php if (strpos($_SERVER['SCRIPT_NAME'], "contact-us")): ?> 

...

<?php endif; ?>


Hope that helps.

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4