Neos shortcut: best practice for Bigpage or Section-Page with anchor?

I’m looking for docs about “Pagetype” «shortcut». Maybe more like «cookbook for shortcut…»
I tried with all different target nodes, but without success.

± Colors (type: Page)
± - Red (type: Page)
± - Blue (type: Page)
± Do it your self (type: Page)
± - Step one (type: Section in Themes with id=“step-one”)
± - Step two (type: Section in Themes with id=“step-two”)

± - Step hundred (type: Section in Themes with id=“step-hundred”)

The shortcut should appear in Menu like «normal Subpages», but in fact, there should only be an Link or shortcut to the parent-Site «Do it yourself» and there to section-id’s. Link for Menu like:

<ul class="sub-menu">
    <li class="normal">
        <a href="/do-it-yourself.html#step-one">Step one</a>
    <li class="normal">
        <a href="/do-it-yourself.html#step-two">Step two</a>
    <li class="normal">
        <a href="/do-it-yourself.html#step-three">Step three</a>

If it would possible, I don’t like to use customized build prototype like this (because of using this combined with other “standard Page types” is more tricky and not that easy to use in different websites like Standard Shortcut-Solution) :

prototype(Vendor.Sitename:Menu) < prototype(TYPO3.TypoScript:Template) {
    items = ${q(node).find('[instanceof Vendor.Sitename][id != ""]')}
    templatePath = 'resource://Vendor.Sitename/Private/Templates/TypoScriptObjects/MenuWithAnchors.html'
    sectionTitle = ${q(node).property('sectionTitle')}

Is there a way to use shortcut for this situation like:

  • Target mode: Parent node
  • Target : #step-one hat Sie zu oft weitergeleitet.
Console: GET net::ERR_TOO_MANY_REDIRECTS step-one.html:1```

So obvious I misunderstand the using of shortcut and create maybe an infinite loop.
- Is there a good documentation about use shortcut in practice, or a tutorial, that I didn't find yet?
- Or has someone an explanation of how and if I can do this with shortcut or something else outOfTheBoxNeos?

Hi together,
I have taken time to understand the Shortcut principle.
Now I’m quite sure, I had understood the principles right, while writing the Topic.
But there are restrictions, those make it difficult or impossible to do the desired job.

###1. Problem
Currently, everytime I write something in the Target field and «Apply» it, the Target mode «Parent node» seams to be deleted/deselected…
####But why there is this Target-field, if it is not contemplated to combine the inserted Target-value with the selected “target mode”?

####Is this a bug, or is there a possibility to overwrite this limitation, so I could use the «Target»-field additional to the selected Target mode «Parent node»?

###2. Problem
It seems, the Target mode «Selected target» allow only databased known target’s as its own. So I could not even choose an hard-coded link like “/parentNodeName.html#desiredIdPosition”

####Is there a possibility to overwrite at least this limitation, so I could use the «Target»-field to set a hardcoded link with ID-anchor?

Of course, a additional solution with «Parent Node» or «First child node» would make a lot more sense. So in future, changing «URL path segment» values, would not end up in error messages for Editor’s who do not know the relationships…

####Would be great to find a helping mind for kill this limitation, or to find a work-around! Or do I have to do a Bug-Report or push an PR for this?

But maybe this is not a bug. Only the shortcut-principle is not flexible enough and the field «Target» is missing a DependingProperty-solution? (wich is quite difficult to understand from the references – I know : Elements in inspector show/hide –> by conditional value of other Element).
And maybe I misunderstood something in the shortcut-principle?

Would be great to hear something about. Thanks!

It works like it’s supposed to, it simply doesn’t cover your use case.

Either a specific target is used (setting target mode to “Selected target”) or the target mode is used, they cannot be combined.

The problem is that you cannot be sure that the other target modes would work with the arbitrary link, since it has to be a document node that has been selected. So you can’t really ensure what you want to do will work, so don’t really see that being added.

Also regarding problem 2., that’s not correct. You can make a link to /parentNodeName.html#desiredIdPosition, just type it in and click enter.

It is definitely a missing feature being able to add a hash to a selected document node and a PR for adding that functionality would be highly appreciated.

Lastly the target mode is already using a DependingProperty solution to change it’s value to “Selected target” as soon as a value is entered in the “Target” field.

1 Like

Hey Aske,

I was not sure, if I understood shortcut-principle per se. Also could not imagine, that this particular use case (bigpage/ID-Page-Anchor), which is quite common in the web, is not covered. Thanks for the salvation :confused:.

Really crazy! I tried various approaches, again and again:

First procedure:

  1. Select in browser-address-field the parent-part from actual shortcut-page (to prevent typos)
    –> So I copied the «/do-it-yourself»-part and added «.html#» by hand in the «Target»field.
  2. Went back to the url and copied the last part «step-one» -> the Target field was still filled with the /do-it-yourself.html.
  3. I clicked into the field for paste it to the end of Target –> the value disappeared.

Second procedure:
I tried to copy&paste a bigger part of the “messy link” like: «/do-it-yourself/step-one» and tried to set the cursor before the second slash, to delete them and type an «.html#» instead of! (The other 40 trials to put an anchor-target in the Target-field …) Also at any try, the target-value disappeared.

I tried both again and again. Alltime the value was gone. So I thought, there have to be a bug or it isn’t possible to write targets “by hand”.

But with your help, it works! – at least, with lot of typing on keyboard:

All is working, when I leave the typo-preventing copy&paste workflow! So, I have - and can only - type the target by hand with the keyboard, or with only ONE COPY&PASTE, where I could add something at the end, and have to press immediately «ENTER».
!But this is great! A working solution for the moment. Maybe it will gain with a PR*

Totally Simple, now that I know it. In the «copy&paste» flow-steps captured, not at all self-explanatory and totally kidding.

###Would be great* …
If it would be possible to change some copy&paste values in the Target-field. Because of:

  • self-explanation
  • to reduce typos
  • to change some saved (after press enter) links

  • But I think this would be quite complex with the standard built-in search-function. Maybe it would help if there would be a hint in the Reference* like: «Don’t try to change a copy&paste value. It will disappear. Only add something at the end. Or use your keyboard for the hole target.» But I’m probably the only one, who stumbles over this curiousness.
    ####Now, I know it forever :relaxed:, I hope…

Now its time to do *it (my first PR in Jira), I think :yum:!

Thank you again, because your comments helps my a lot!

*I will do my best, but have to study first this dreadful :mask: Jira-stuff, the rules and conditions about.
Frankly, for beginners, it looks not self-explanatory and is more reminiscent of a 90’s forum, or an eye disease (compared to the discourse-forum, neos-website, references, github, …). But I’ll rummage through. So I may see better, how I can help in terms of documentation/reference or other Neos-voluntary-work. As Dominique on Slack has directed me to Jira for this request, it was quite sobering. Puted my motivation a little aside. This time, I will stick to it – I hope :triumph:.
But it will take some time.

Hmm I don’t really get this, that’s not something I’ve ever had any problems with. I can copy/paste etc. What browser are you using and could you make a video of how it’s behaving unexpectedly?

However once it’s saved you cannot edit it, that’s true and that could be made possible fairly easily. A PR for that would be great.

Regarding making it possible to add a hash, that’s quite a complex task and can be solved in many ways. But the thing is that it requires the linking concept to be expanded, which touches many parts of the code. The problem is storing additional link information and taking that into account when parsing links. So if you’d like to work on this, I’d suggest we create an RFC here on Discuss about it first.

Don’t worry about that, there aren’t really any rules, just simple best practices. Create an issue in the Neos project and we’ll be happy to help with additional information or move it if needed.

For more information we have these unfinished guides atm. Contributing to the Neos Project / Code contribution guideline. But you’re right, we need to finish those to make it easier for newcomers and your feedback/help would definitely be appreciated on that.

Copy/paste –> also no problem at all. To change something in this pasted content, that is the magic, that makes everything disappear; On my system and with my workflow with the mouse.
All Browser checked:

  • Google Chrome 50.0.2661.102 (64-bit)*
  • Firefox 46.0.1*
  • Safari 9.1.1
  • Opera 37.0.2178.43
  • Vivaldi 1.1.453.59
    All on OSX El Capitan 10.11.5

In everyone the “paste” value disappears, if I click on it to change. only possible with keyboard arrows to get to the «slash» in the middle and change it to «.html#». Or I press keys directly, to add some alpha/numbers at the end. Both is OK, and an acceptable solution.
But for me it is not possible, to use the mouse to set the cursor to the required point. The video will show this. (*only Chrome and Firefox on video but in all Browser the same behavior)

Hafe to read first your guides. Friend Google found also a view Links about Jira. I should apologize to the Jira-UI-Designer: The Dashboard have only this 90’s-look :blush:. All the other stuff is shiny, but need time to understand the meaning and use :pensive:. Thanks for your guides-link.

After reading, I’ll come back to it.

Okay with the video now I understand what you mean, was pretty cryptic before. Thanks.

Basically removing focus and focussing the field again to continue typing in a link is just not handled, not really a bug per say, but should be of course possible.

Basically it’s just a scenario that wasn’t thought of or ignored during implementation due to time constraints.

But again that could fairly easily be solved, so a pull request is very welcome for that too :slight_smile:

:wink:Some would say: »German is a difficult-to-learn language.«
However, I use English for puzzles, cumbersome descriptions for simple German thoughts and cryptic stuff.:dizzy_face: (Unintentionally :grinning:)