in Flowcode Web programming, how do you add multiple web pages?

Discuss PC Developer and Web Developer projects and features here.
Post Reply
niedian
Posts: 105
http://meble-kuchenne.info.pl
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Flowcode v10 in Flowcode Web programming, how do you add multiple web pages?

Post by niedian »

Hello, in Flowcode Web programming, how do you add multiple web pages? Greeting!

Steve-Matrix
Matrix Staff
Posts: 1465
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 347 times

Re: in Flowcode Web programming, how do you add multiple web pages?

Post by Steve-Matrix »

Currently, the best way is to create separate web apps for each page.

niedian
Posts: 105
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Re: in Flowcode Web programming, how do you add multiple web pages?

Post by niedian »

In this case, to create links or redirects between pages, you would need to set up additional links via an intermediary page that you have pre-established.

Steve-Matrix
Matrix Staff
Posts: 1465
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 347 times

Flowcode v10 Re: in Flowcode Web programming, how do you add multiple web pages?

Post by Steve-Matrix »

Not necessarily. You could have links in your own Web Developer app just as easily. For example, see the attached project.

On the panel I have added a single label called "lblWebLink". This has no text, but I have given it a background colour so you can locate it. I have used a trick in the "Custom Attributes" property to turn this into a link. This property puts custom text into the <div> tag for the object and allows you to extend its behaviour using extra html attributes or elements.

To create this link, I have entered the following:

Code: Select all

><a href='https://www.flowcode.co.uk'  target='_blank' rel='noopener noreferrer'>click this link</a
When this is added to the <div> tag of the label in the generated page, it first closes the <div> tag and then adds a new <a> element with that actual link and corresponding text. The 'target' and 'rel' entries force the link to open in a new tab.

When this Custom Attribute property is added to the html output, we get something similar to the following:
new_a_tag.png
new_a_tag.png (15.76 KiB) Viewed 15178 times

I have highlighted the text from the Custom Attributes so you can see how it combines with the normal Flowcode-generated object.

Note that the link itself could be relative - e.g. href='./page1.html' - which would allow multiple Web Developer apps to open each other.

To make this easier, I will try to find the time to create a new component for creating a link like this.
Attachments
WebDeveloperLink.fcsx
(8.24 KiB) Downloaded 345 times

niedian
Posts: 105
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Flowcode v10 Re: in Flowcode Web programming, how do you add multiple web pages?

Post by niedian »

Why is it written like this?
><a href='https://www.flowcode.co.uk' target='_blank' rel='noopener noreferrer'>click this link</a

Rather than writing it this way?
<a href='https://www.flowcode.co.uk' target='_blank' rel='noopener noreferrer'>click this link</a >

Regards.
Attachments
Snipaste_2024-08-08_18-58-24.png
Snipaste_2024-08-08_18-58-24.png (36.54 KiB) Viewed 15150 times

niedian
Posts: 105
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Re: in Flowcode Web programming, how do you add multiple web pages?

Post by niedian »

Oh, looking at your post again, I think I understand now, thanks!

Steve-Matrix
Matrix Staff
Posts: 1465
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 347 times

Flowcode v10 Re: in Flowcode Web programming, how do you add multiple web pages?

Post by Steve-Matrix »

The first ">" closes the 'div' tag and then the final "/a" is left open. This is because Flowcode puts this custom text within the "<div .... >" tag.

I have made the attached component which should make this easier. To try the component:
  • Browse to this location using file explorer (copy it into the address bar)

    Code: Select all

    %ProgramData%\MatrixTSL\FlowcodeV10\Components
  • Place the attached component.
  • Open Flowcode and open or create a new Web Developer project
This component is unofficial at the moment, but we will add it probably next week once we have tested it further.
Attachments
WebTextUrl.fcpx
(5.35 KiB) Downloaded 369 times

niedian
Posts: 105
Joined: Thu Jan 07, 2021 11:28 am
Has thanked: 3 times
Been thanked: 4 times

Re: in Flowcode Web programming, how do you add multiple web pages?

Post by niedian »

I gave it a try, and it's very convenient, super awesome, thumbs up!

Post Reply