Eos question.
Eos question.
I was wondering if it was possible to have 2 Goto lines in a row. Where the first Goto would lead to an Enabled page(s) at first but later on it would lead to Disabled page(s) but would get ignored because of that. Then it would choose the next Goto line which would lead to an Enabled page(s).
-
- Explorer
- Posts: 96
- Joined: Sat Aug 24, 2019 11:42 am
- Gender: Male
- Location: Germany
Re: Eos question.
From the help page:
A Goto-action with a pattern repeat* will 100% goto repeatA, because it's the only one enabled.
You can then disable A and enable B and the next time it will go the other way.
For example, let's assume your pages are called repeatA (enabled) and repeatB (disabled).Pages can be "enabled" or "disabled". The only difference is that when using a Goto action with a wildcard target, e.g. "page*", only enabled pages will be considered as possible targets.
A Goto-action with a pattern repeat* will 100% goto repeatA, because it's the only one enabled.
You can then disable A and enable B and the next time it will go the other way.
Re: Eos question.
While undeniable_denial probably answers your question better with a correct solution, I'll give a more direct answer:
No. If you have two gotos, one right after the other, the second will never trigger. If the first goto doesn't have any enabled pages it will fail, log an error on the console, and never continue to the second. If it has enabled pages, it will go to one of those, never continuing to the second goto.
If you wanted to implement a terrible hack (please don't), you could put a 0.1s asynchronous hidden timer before the first goto with what would have been your second goto action. In this case, if the first goto fails, the goto in the asynchronous timer would pick up the slack. But, if the second goto doesn't contain any enabled pages, it would fail as well. Regardless, it would be far better to structure your pages in a way that wouldn't require such a hack.
No. If you have two gotos, one right after the other, the second will never trigger. If the first goto doesn't have any enabled pages it will fail, log an error on the console, and never continue to the second. If it has enabled pages, it will go to one of those, never continuing to the second goto.
If you wanted to implement a terrible hack (please don't), you could put a 0.1s asynchronous hidden timer before the first goto with what would have been your second goto action. In this case, if the first goto fails, the goto in the asynchronous timer would pick up the slack. But, if the second goto doesn't contain any enabled pages, it would fail as well. Regardless, it would be far better to structure your pages in a way that wouldn't require such a hack.
-
- Explorer
- Posts: 96
- Joined: Sat Aug 24, 2019 11:42 am
- Gender: Male
- Location: Germany
Re: Eos question.
Fair point, but I would like to clarify, that you can indeed go to a disabled page if there is an exact match. The disabling-functionality only affects the wildcard-patterns and it seemed to me that relying on that functionality was ChaChan's primary intention with stacking Gotos being an attempt to get there.
Re: Eos question.
Good point. Yes, enable/disable only applies to wildcard matches.
It seemed like ChaChan was after a way to move on to one group of pages after another group had been exhausted? If so, I suppose my hack work work for that -- but again, I'm hesitant to recommend anyone use it.
It seemed like ChaChan was after a way to move on to one group of pages after another group had been exhausted? If so, I suppose my hack work work for that -- but again, I'm hesitant to recommend anyone use it.
-
- Explorer At Heart
- Posts: 557
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: Eos question.
I would just use an if-action to do that.
You can check using the API whether a page is enabled or just use your own variable.
You can check using the API whether a page is enabled or just use your own variable.
Re: Eos question.
For a single page, yes, but I don't think there's a way to do that for a group of pages, is there? Does pages.isEnabled('page-group-*') work?
-
- Explorer At Heart
- Posts: 557
- Joined: Sun Jul 06, 2014 2:11 pm
- Gender: Male
- Sexual Orientation: Open to new ideas!
- I am a: Slave
Re: Eos question.
Re: Eos question.
Well, thanks for your replies guys. I´m not gonna implement the hack and coding aint my strongpoint either, so guess
i´ll add more pages then.
i´ll add more pages then.
Who is online
Users browsing this forum: No registered users and 6 guests