How to Retrieve Main Menu Items from Drupal 7 - web-services

I am trying to get Main Menu Names in Drupal 7, I have used below query but seems its not matching with Menu which are displaying on website.
SELECT * FROM menu_links where menu_name='main-menu' and hidden=0
and mlid=p1 order by weight
Any suggestion? how to get Menu names from Druapl 7?
Note : Druapl 7 based site has used TB Mega Menu for Menu.

You have a menu_get_names function in the Drupal API. It returns an entire list of menu names.

Related

Interactive Grid shows no results when filtered or sorted

I am using Oracle Apex v21.1. I have an Interactive Grid on a Modal Dialog Page which gives me the logs of the modifications made on a certain item.
Here's the scenario :
Select the item on the list Step 1
The details page of the item opens
Click on the "Logs" button Step 2 & 3
The "Logs" button open another Modal Dialog Page which displays an interactive grid Step 4
The "Logs" button set the value of the primary key to the interactive grid, so the list is filtered to show the information of this particular item. Step 5
Everything works fine, but when I try to apply a filter, sort or search, the interactive grid refresh, shows no data, and a blank column appears. If I close the list but reopen it again, the results are appearing, based on the filter, sort or search.
What could be the reason behind this problem ?
Here's the code of my Interactive Grid
SELECT * FROM inv_tb_item_logs
WHERE pk_article = :P24_PK_ARTICLE; --pk_article is my primary key
You can see more details on the screenshots
Thank you in advance,
Thomas
Based on Koen Lostrie's answers, here's how to fix it :
Create an Hidden Item to retrieve the ID of the Item later on the Logs List page Step 1
In the Behaviour of the Logs button, set the value of the hidden item to the value of the ID of the Item Step 2
Change the WHERE clause to WHERE id_item = :P25_PK_ARTICLE
In the Page Item to Submit attribute, select P25_PK_ARTICLE
I had to create this specific hidden item because i couldn't select the P24_PK_ARTICLE item to submit since it was on another page.
I hope this could help other people, thanks again for your answer Koen !

Auto-Complete Popup Lov in Apex 4.2

Have a question.
I created an Item called P2_CITY_NAME which is a Popup Lov using the following query
SELECT DISTINCT TOWN_OR_CITY A, TOWN_OR_CITY B
FROM APPS.PER_ADDRESSES
ORDER BY TOWN_OR_CITY DESC;
Now when I run the page and see the popup, I can type the city name like Texas City but if I write Tex and press Tab it does not fill automatically.
How can I fill the city name automatically without typing the whole name? Like the onces they use is ebs
I tried text area with auto-complete also but want to know whether the above can be done for popup lov?
I am using apex 4.2 and ebs r12
The easy option: transform your element,P2_CITY_NAME, into a select list.
The second option and probably the best is to instal and use a select2 plugin. I use this one. Look on the demo page if this is what you want.
And final and the hard one update to apex 5.

Pass Variables Between Pages in Apex

I have an interactive report, page 4, which displays a list of projects. Each row that is displayed has a check box. When I select the check box for a specific row, I want to go to page 10 which displays a list of documents which can be allocated to the project. To do this, I need to pass the project_id, from the projects page to the documents page.
I have created P10_PROJECT_ID on page 10 to receive the project if
I have created a submit button to be clicked once a project has been selected. In the page button processing I have set up the 'Action when button is clicked' as
Action: Redirect to Page in this application
Page: 10
Set these items: P10_PROJECT_ID
with these values: &PROJECT_ID.
However the project id is not being passed from page 4 to page 10. If I change &PROJECT_ID. to the value 101, the value is passed
Please can someone help explain where I have gone wrong when trying to pass the variable for project id?
Thanks
Tracey
If I understand the question, you need pass 1 project_id.
In region source of your report change your select like:
SELECT name, description,
'display DOC' link
FROM your_table
you will get link to 10 page in your report (id value transmits to P10_PROJECT_ID)

How to display a menu based on another menu's submenu items (Joomla 2.5)

This is probably really easy to do and I'm probably missing the wood for the trees but I'm trying to display a menu on a selection of pages which contains the sub menu items from the equivalent main menu item.
For example, the main menu has 'Products' (parent item) listed with 'Product 1', 'Product 2' and 'Product 3' as sub menu items (child items). Is it possible (without creating duplicate articles) to create a submenu which only shows the child items but which links to the same articles as from the main menu?
I've read about using menu-alias but none of the documentation I've found gives a clear message on this.
Thanks.
1) Go to Menus -> Menu Manager -> Add Menu.
2) Add a new menu item in it, choose for type Menu Item Alias and on the right side under Menu Item choose which Menu you want it to be the copy of (not a real copy, but an alias).
3) Repeat 2) for all menu items you want to display
4) In Module Manager, add new Menu module, choose your newly created Menu, assign it to some position and publish.
#Marko D's solution works well and can be customised to suit many variations.
There's another option in this case where you don't event need to create another menu or menu aliases.
1) In module manager, add a new menu module, name it, position it, apply it to the relevant pages, then under Basic Options choose the main menu in question and a start level of 2 and publish
2) No number 2 ;)
It's always good to have more than 1 option!

Add submenu using controls/toolbox items or any other way?

I have a menu with 4 menu items. The 4th menu item is to be having upto 3 sub-menu items.
Im working in VS2010.I'm looking for adding a submenu to an already existing menu in VS 2010. Is there a way I can do it using controls/toolbox items or in any other alternative in VS?