Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
My apologies if I'm missing something here.
If you want to create a link to another page on the same site, I

highlight the text in the editor
click the link icon
click the browse server button

I expected that to go to a list of pages the user could select from - php/html files, however it goes to the files folder. That's great for linking to pdf files, etc. but not for linking to other pages.

So they just have to copy the url of a page from the browser and paste it into the url field of the link dialog?

Just want to confirm that there isn't an easier way to do that.
Hi,

I'm afraid, for now we have to copy/paste the actual URL to link to other pages of the site.
A browser that shows cloned pages of all templates in the site would have been useful but, sadly, is not yet available.
Okay. Thank you.
Has this issue been adressed by now? Having access to all pages (as a link via an unique identifier) would be a really great feature.
@madtrigger,

The CKEditor website (click here) shows demo of their latest WYSIWYG Editor version 5.

If you visit the above link, then you will be able to see that there have been a lot of changes including the hyper-linking option. But although the interface to hyperlink a text through the editor still allows one to add a URL directly (unlike the previous version that allows browse option). The new thing added to it is a switch to mark if the link content should be downloadable and commit/ discard change buttons. I have attached an image below taken as a screen shot from the above.

ckeditor.png
ckeditor.png (101.93 KiB) Viewed 3349 times


So till the CKEditor does not update their hyperlinking, this issue is here to stay.
Image
where innovation meets technology
Unfortunately, you misunderstood me. What I meant is the following: in a website content often uses links to other parts of the website, e.g. the contact page. Currently, you have to hardcode the link to this page. If the contact page url changes, the link will be broken. Therefore it would be great if I could choose a link from all available pages in couch. Do you know what I mean?
Links in edited texts are fixed by their nature, so a changed URL naturally requires search-and-replace kind of thing. Here is a possible solution — if you firstly look at the tag <cms:link /> https://docs.couchcms.com/tags-reference/link.html then it has an example of generating a link (follows pretty-url setting) by page name e.g.

Code: Select all
<cms:link masterpage='news.php' page='first-news-item' />

So, if the page 'first-news-item' gets renamed to a different name (not title), then this hardcoded link would become broken leading to 404. However all pages in Couch have IDs, and this tag had been amended to allow parameter page_id to be used (PHP code in couch/tags.php) so this opens up an option to code links to pages prone to be name-altered by their ID instead. If you delete such a page and create a new one with the same name, ID would increment thus again the link becomes broken (IDs are never reused, btw). A link tag can be used in edited texts with the help of a shortcode, see https://docs.couchcms.com/miscellaneous/shortcodes.html

It is possible to have the link tag recoded to expand the search of pages to include a unique handle which you would autogenerate for each page manually, if needed. The idea here is assign a handle (uniqness can be validated) and shortcode the link via this handle, allowing the page to be moved, changed name, ID etc.. It would be beneficial to the topic if you could provide a real life example where links become broken on your website. The 'contact-us' example did not work for me, as the 'contact-us' page could be a template 'contact-us.php' with no possible change of name in a deployed site. It is also possible to order coding a tool to find, validate and list broken links of your site, if that happens often, for admins to edit.
madtrigger wrote: Has this issue been adressed by now?

I actually answered your question.

Regards,
GXCPL (CTR)
Image
where innovation meets technology
8 posts Page 1 of 1
cron