WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 12.06.2020 00:41:22

keepshango
Mitglied

Link to anchor in same page ?

Hi,

Unless I am mistaking, the anchor principle In WBCE CMS documentation, is only explained in context of using the “MenuLink“ add-on

*** Q1 ***
How then to relate a text link in an upper page content, to a lower content in the same page using an anchor ?

*** Q2 ***
Considering that a sidebar page content (with anchor pointing to it) shows on mobile screen under main content area when scrolling up the page, if a related link in this main content area is clicked, will this automatically trigger the page scroll up on the mobile screen until the anchor is reached ?

Regards

Offline

#2 12.06.2020 06:48:39

bernd
Developer

Re: Link to anchor in same page ?

Q1:
1. set the anchor on the page
Auswahl_016.png
2. set the link to this anchor (choose Linktype Anchor ...)
Auswahl_017.png

Q2:
not tested, but theoretically it should make no difference where on the side the anchor is


... nein in Europa verwenden wir beim Programmieren nicht € statt $ ...

Offline

Liked by:

florian

#3 12.06.2020 07:20:53

florian
Administrator

Re: Link to anchor in same page ?

Additional info:
if the anchor itself is in another section than the anchor link, you have to enter the anchror link manually, because the WYSIWYG editor does not "know" which anchors (if any) are in which section.

So after creating an anchor in one section and saving it, go in the 2nd section on the edit link button as described, but do not choose the link type anchor (because there won't any anchors been listed), but "URL" and enter the anchor id like this:
attachment.php?item=2455&download=1

Please notice that the entries are saved correctly, but when you go again on the link dialogue ckeditor is on the one hand so clever that it recognizes the link as an anchor and switches automatically over to the link type anchror view, but on the other hand ckeditor is also so stupid that neither there nore in the link type URL view the formerly entered anchor link shines up and has to be re-entered.)

Beitrag geändert von florian (12.06.2020 07:21:26)


Code allein macht nicht glücklich. Jetzt spenden!

Offline

#4 12.06.2020 07:28:21

florian
Administrator

Re: Link to anchor in same page ?

About your 2nd question: Yes. This works generally, but the anchor might be hidden under the sticky navigation. To avoid this, add the following lines to templates/acourdesz/template.css:

a[name] {
	padding-top:120px;
}

Code allein macht nicht glücklich. Jetzt spenden!

Offline

Fußzeile des Forums

up