select field with sql query to select joomla menu item

More
9 years 4 months ago #56198 by bobthebob01
Hi,

I was wondering if it was possible to create a select list of all menu items.
I need to create a field for a specific content type where one will be able to add a link to an internal page. I know i can create a simple link field and have user copy paste the link, but I wanted to see if I could make that more user friendly.

Thanks in advance.

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #56203 by micker
i think you can use select list field and use sql request inside to list all link in menu

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #79701 by kath
Hello there,

I'm trying the above, but my select-list shows a seeminlgy random sub-set only.

I tried several possible sql statements.
All of them work in phpMyAdmin.

But in my field-config (editing > values > value creation > use sql=Yes; field elements) they all yield a too short result.

Can I use a pure, unaltered SELECT-statement, or can I get all list of frontend-menu-items for my backend-user on a different way?
Thanks!

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #79702 by micker
can you put your sql request here ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #79709 by kath
Sure! I tried for example successfully in phpMyAdmin:
  • SELECT link as value, path as text FROM #__menu WHERE type='component' AND published=1 AND client_id=0;
  • SELECT link as value, title as text FROM #__menu WHERE type='component' AND published=1 AND client_id=0;
and several other similar once. They all work in phpMyAdmin. But my flexicontent-field-config just throws me less then 100 % of the values.
(Is there some LIMIT doing it's job maybe?)

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #79712 by micker
hello not sure but request is
SELECT link AS value, path AS text FROM #__menu WHERE type='component' AND published=1 AND client_id=0
=> without ; at end

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.410 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline