Hi Guys,
I am trying to work out how to populate a menu/navigation system from sql.
Basically adding children/nodes from a sql table ?
Do I have to do it in Code ?
Thanks
Lee
Hi Guys,
I am trying to work out how to populate a menu/navigation system from sql.
Basically adding children/nodes from a sql table ?
Do I have to do it in Code ?
Thanks
Lee
Hey Lee,
There are a few ways to get a menu/navigation system going in Alpha. There's a Button Menu action, a List Control Menu, a Tree Control.
Are you working toward a web page? A Mobile App? Context is important here.
Hi David,
Its a basic intranet website to learn alpha, usually I would use php/sql.
In Alpha I am using the built in navigation component, should I be using something else ?
Creating a horizontal type menu with custom css looking like tabs
Thanks
Lee
Last edited by leemillard; 06-23-2017 at 03:31 AM. Reason: add info
alpha provided navigation system is not the greatest, that is their weak point and least attended to by them, if you ask me.
navigation system is nothing more than an un-ordered list with css markup to look pretty. you seems knowledgeable enough and comfortable enough with your exposure in php, i am sure you can do it better. ( if you restrict all navigation end points in pages than components, i would imagine)
ps: alpha also provides tabbed ui component, you could use that for navigation purposes exposing a5w pages, components, dialogs/ux, and reports etc.,
ps2: you can also use dialog/ux with div below it to display the content as injected content. the dialog will only contain buttons and they will open desired component below the dialog/ux as embedded material.
Last edited by GGandhi; 06-23-2017 at 04:31 AM.
thanks for reading
gandhi
version 11 3381 - 4096
mysql backend
http://www.alphawebprogramming.blogspot.com
ggandhi344@gmail.com
Skype:ggandhi344@gmail.com
1 914 924 5171
Can I use either of these to also make the menu show the correct current page on screen too?, as well as getting the menu names from a SQL row ?
Last edited by leemillard; 06-23-2017 at 06:24 AM. Reason: add info
i haven't tried so i don't know.as well as getting the menu names from a SQL row ?
if you mean that by selecting a button will a correct page load? yes it will. take a look.Can I use either of these to also make the menu show the correct current page on screen
thanks for reading
gandhi
version 11 3381 - 4096
mysql backend
http://www.alphawebprogramming.blogspot.com
ggandhi344@gmail.com
Skype:ggandhi344@gmail.com
1 914 924 5171
No I mean if i want to highlight the current page thats already loaded on screen ?
the button will light up, if that is enough for you (just like the way navigation bar works, they are nothing but css)No I mean if i want to highlight the current page thats already loaded on screen ?
thanks for reading
gandhi
version 11 3381 - 4096
mysql backend
http://www.alphawebprogramming.blogspot.com
ggandhi344@gmail.com
Skype:ggandhi344@gmail.com
1 914 924 5171
I cannot get the navigation bar to even do that
Last edited by leemillard; 06-23-2017 at 07:43 AM. Reason: spelling mistake
what you want to do?, what is your desire?I cannot get the navigation bar to even do that
i will show you in tabbed ui or ux or in general nav bar.
if you search this board for navigation bar, you will see a commercial product used by steve, you can use it if you don't want to construct by yourself.
thanks for reading
gandhi
version 11 3381 - 4096
mysql backend
http://www.alphawebprogramming.blogspot.com
ggandhi344@gmail.com
Skype:ggandhi344@gmail.com
1 914 924 5171
Here's an Alpha video showing a UX with a Tab Control.
http://www.ajaxvideotutorials.com/V1...ActivePane.swf
I don't think there is a Component that takes it's Tab label information from a SQL source. However, that's not hard to build... it just depends on how dynamic you want things to be.
The attached UX contains a Tab Control with 4 Tab Panes. The "Get SQL Tab Labels" button makes an Ajax Callback to the Alpha Server which runs an Xbasic Function (found in Xbasic functions)
The Xbasic function queries a SQL Table and formats the data into an Array of JSON Objects. The Xbasic function then returns a call to a Javascript Function (found in Javascript functions)... and includes the data.
The Javascript function gets information about the Tab Control (e.g. the Pane Count) and then goes through a loop setting the Tab Labels.
Since you're new to Alpha this UX demonstrates a few things:
Ajax Callback to the server to run an Xbasic function.
XBasic to query a SQL data source
Return code to run a Javacsript Function with SQL Data formatted as a Javascript Array of JSON Objects.
Bookmarks