Any chance Wix could support page links to relative URLs? Or support built in page links to dynamic and blog pages?

I am working with someone who is porting their HUGE website to Wix. He has well over 100 pages, so we can’t just make static pages. His pages don’t lend themselves well to the idea of dynamic pages, but they do lend themselves quite nicely to the Blog.

The Blog is actually much easier for him to build pages in than making static pages. There is just one problem…linking to those pages.

There is no built-in/easy way to link to a blog post. Here are the ways I’ve investigated. Each one of them comes with their own problems and limitations.

1. Page links from the built in link tool… don’t work
The built in link tool doesn’t give you the choice of linking to a page underneath the blog. It gives you two choices.

  1. Blog (which links to the Blog’s Feed page)
  2. Post (which links to …/post which goes nowhere. Perhaps this should actually list posts underneath your blog, but it doesn’t)
    Awesome Screenshot

2. Web Address links from the built in link tool… sort of works
They only work if you put the full URL in…not a relative URL.
https://www.awesomescreenshot.com/image/13304107?key=3fbc2583e36229f947456e78a5d3cc2e

This works:
https://polkaset.wixsite.com/testing/post/manage-your-blog-from-your-live-site

This does not:
/post/manage-your-blog-from-your-live-site

This means if you have more than one domain mapped to your site, the links won’t work. Also, while you’re in development (before moving your domain over), your links won’t work. Also, if you ever change your domain, you have to go find every one of these links and change it. That’s brittle.

3. I can write a click handler… sort of works

export function button1_click(event) {
    wixLocation.to('/post/manage-your-blog-from-your-live-site');
}

The button works, but the onHover behavior doesn’t put the link preview up in the lower left hand corner of the browser tab.

  1. I can’t make links out of snippets of text…doesn’t work
    Links are often not single DOM elements, like one button, or an entire text element. This person needs to be able to link from a word in a paragraph. For example:

Blah blah blah…here is some text in my article. And if you’re curious, this is my amazing article on why snuffaluffagus is the best muppet.

(where the text in blue is the link)

As far as I know, the only way to make those links is to use the link tool. There’s no DOM Element with an ID I can add a click handler to.

The built in link tool, again, does not allow you to use a relative link. So you’d have to make these into fully qualified links…(brittle for the reasons listed in #2)

Incidentally, a similar problem exists with Router pages (The link tool is broken for sub pages. It allows you to select them, click “done” but then they don’t actually work, and the next time you go into the link tool, they’ve been set to Home, or whichever page is first in the list)

Dynamic pages DO let you link to a specific page underneath the dynamic page:
https://www.awesomescreenshot.com/image/13304401?key=e24f60ab4c9faa9470c1de487a5bb2d7

But these pages just aren’t well suited for dynamic pages.

Is there any solution out there?

Hey. I have a very similar problem. I have to build a dynamic link to the router page.

I use an npm package url-join for building links. It looks like as:

import { prefix } from 'wix-location';
import urlJoin from 'url-join';

// ....

$w('#buttonLink').link = urlJoin('/', prefix, 'path/to/page');

Velo: Working with npm Packages

I just found a collection type called “Rich Content”. I didn’t ever remember seeing that, so I played with it.

Basically, you can create an article/UI/whatever, put whatever you want on it, and hold that in a collection. Then you can create dynamic pages from that collection and add the Rich Content element to your dynamic page.

Pros:

  1. Allows you to use dynamic pages instead of static pages, thus getting past the 100 page limit for huge websites

  2. Allows you to link TO the page from other pages in the website
    Cons:

  3. The editor is VERY limited (unless you want to hand code HTML). The biggest problem for me is that you can’t wrap text around images like you can in the blog. You can’t even “fake it” with multiple text blocks like you have to do on static pages. This is a deal breaker.

  4. LINKS FROM WITHIN THE RICH CONTENT ELEMENT ARE NOT USEFUL . You get two choices: Web address, Section. Again, NO PAGE LINKS. This means, you can link TO the page containing the rich content from somewhere else, but you can’t put a link IN the content that points to other pages/content.

Why can’t the Rich Content simply use the same UI builder as the blog? This offers much more flexibility for laying out articles.

Why can’t page links FROM INSIDE the rich content be supported. This is now no better than the not-useful Blog links. In fact, it’s almost worse. You get links that are useless, AND a UI that is simplistic.

Dang. I thought this was going to solve all my problems and bring world peace…but alas…