/    Sign up×
Community /Pin to ProfileBookmark

Mambo-Newbie question: displaying your own menu

Hi all,

Newbie on Mambo here! There’s a special section to my site where I would like to display a custom menu consisting of 3 items.

Ideally, the menu would be displayed like this:

<div id=”other_links”>
<a href=”#” class=”addtopborder”>Newsletter</a>
<a href=”#”>Press</a>
<a href=”#”>Search</a>
</div>

However, I do want these links to come through via a Mambo menu. I can assign these 3 pages to a mambo menu (e.g. “otherlinks_menu”) – the question is, how do I display them on my index.php page?

Should I do this by doing a SELECT on the database where menu = “otherlinks_menu” ? And then I can display the items that fall under it?

If so, what SQL should I use and how do I execute this SQL? e.g. is it something like:
$query = “SELECT * FROM #__menu WHERE menutype=’otherlinks_menu’ ORDER BY ordering”;
$database->setQuery( $query );

And then I can use mysql fetcharray functions to retrieve the data?

Any advice would be appreciated!
Many thanks!

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @rishijd spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...