Prev-Next CMS Articles [no dependencies]

Hi all
Today I have took another Proof Of Concept challenge to see how complicated can be to create custom navigation for articles as WF doesn’t offer it. In reality I have done this hack with several lines of code.

As it is only POC it is not ready for production so feel free to look on the code and refactor it the way you need and share results.

Preview

ReadOnly

2 Likes

Nice job!!

A question, why do you use window.location and not inject it into the anchor?

I don’t know if with href help with SEO, accessibility or something.

Hi @adrianoresende I don’t understand what do you mean by using anchor? Do you mean create anchor elements and dynamically feed href.

I thing you can do that by changing nav divs to anchors and create a new logic for it. As I have said this project was only PoC and the way I have it done was easier way for me to build .

Feel free to adjust source code the way it is more suitable to your needs or just look on it as an concept to build functionality your way.

As each developer write code different way and there is always many ways to achieve identical result don’t forget to share your code once is done. :wink:

EDIT: I had now short look on internet and maybe anchor href will be better to use as there are differences what informations are carried with location and href. Good point. :wink:

1 Like