Problem with visited links

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with visited links

Long Haired David
Hi there. I have a hybrid site where some pages are rendered by Seaside (using Instantiations VisualAge) and some are straight HTML. In the HTML pages, I use the following in a css:

a:link {
    color: red;
}
and
a:visited {
    color: yellow;
}
This works fine. In my Seaside pages, I use a css method with the same content but the visited links all turn up in a dark red, no matter which colour I say to use. This is the same on all browsers tested across both Windows and Macs Safari, Firefox, Edge.

Am I doing something wrong?

David


Message sent using Winmail Mail Server

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: Problem with visited links

jtuchel
David,

you are not doing anything wrong. Open your web browser's Developer tools and look at the links that were rendered by seaside: they contain URL parameters that are unique for every render (the part after the ? in the href parameter), so technically, the link is never visited, because every time you render that page, the URL parameters will be different (this is a simplification with edge cases and people can start picking on me, but you get the picture).

There are ways to make Seaside use "nice" URLs, but out of the box, this is just the way it works.

Joachim


Am 14.09.17 um 21:50 schrieb David Pennington:
Hi there. I have a hybrid site where some pages are rendered by Seaside (using Instantiations VisualAge) and some are straight HTML. In the HTML pages, I use the following in a css:

a:link {
    color: red;
}
and
a:visited {
    color: yellow;
}
This works fine. In my Seaside pages, I use a css method with the same content but the visited links all turn up in a dark red, no matter which colour I say to use. This is the same on all browsers tested across both Windows and Macs Safari, Firefox, Edge.

Am I doing something wrong?

David


Message sent using Winmail Mail Server


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          [hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Problem with visited links

Long Haired David
In reply to this post by Long Haired David
So, if I hand carve the links, I should be able to get this working. It is bugging my customer so I have to do something!


Thanks Joachim.


--------- Original Message ---------
From: "[hidden email]" <[hidden email]>
To: "David Pennington" <[hidden email]>, "Seaside - general discussion" <[hidden email]>
Subject: Re: [Seaside] Problem with visited links
Date: 09/14/2017 20:55:14 (Thu)

David,

you are not doing anything wrong. Open your web browser's Developer tools and look at the links that were rendered by seaside: they contain URL parameters that are unique for every render (the part after the ? in the href parameter), so technically, the link is never visited, because every time you render that page, the URL parameters will be different (this is a simplification with edge cases and people can start picking on me, but you get the picture).

There are ways to make Seaside use "nice" URLs, but out of the box, this is just the way it works.

Joachim


Am 14.09.17 um 21:50 schrieb David Pennington:
Hi there. I have a hybrid site where some pages are rendered by Seaside (using Instantiations VisualAge) and some are straight HTML. In the HTML pages, I use the following in a css:

a:link {
    color: red;
}
and
a:visited {
    color: yellow;
}
This works fine. In my Seaside pages, I use a css method with the same content but the visited links all turn up in a dark red, no matter which colour I say to use. This is the same on all browsers tested across both Windows and Macs Safari, Firefox, Edge.

Am I doing something wrong?

David


Message sent using Winmail Mail Server


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          [hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1



Message sent using Winmail Mail Server

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: Problem with visited links

Johan Brichau-2
You can also keep reference of the visited ‘pages' in the session state and generate the anchors with a css class to color them yellow.
For example, if the links are in a menu component, you can keep the already visited menu items in the session state and render the menu items differently using that information.

I think that would be easier than hand-crafting the urls, unless you implement a complete ‘Seaside-Router’ package, which would be very interesting of course.

Johan

On 14 Sep 2017, at 22:46, David Pennington <[hidden email]> wrote:

So, if I hand carve the links, I should be able to get this working. It is bugging my customer so I have to do something!


Thanks Joachim.


--------- Original Message ---------
From: "[hidden email]" <[hidden email]>
To: "David Pennington" <[hidden email]>, "Seaside - general discussion" <[hidden email]>
Subject: Re: [Seaside] Problem with visited links
Date: 09/14/2017 20:55:14 (Thu)

David,

you are not doing anything wrong. Open your web browser's Developer tools and look at the links that were rendered by seaside: they contain URL parameters that are unique for every render (the part after the ? in the href parameter), so technically, the link is never visited, because every time you render that page, the URL parameters will be different (this is a simplification with edge cases and people can start picking on me, but you get the picture).

There are ways to make Seaside use "nice" URLs, but out of the box, this is just the way it works.

Joachim


Am 14.09.17 um 21:50 schrieb David Pennington:
Hi there. I have a hybrid site where some pages are rendered by Seaside (using Instantiations VisualAge) and some are straight HTML. In the HTML pages, I use the following in a css:

a:link {
    color: red;
}
and
a:visited {
    color: yellow;
}
This works fine. In my Seaside pages, I use a css method with the same content but the visited links all turn up in a dark red, no matter which colour I say to use. This is the same on all browsers tested across both Windows and Macs Safari, Firefox, Edge.

Am I doing something wrong?

David


Message sent using Winmail Mail Server


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          [hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1



Message sent using Winmail Mail Server
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Problem with visited links

Esteban A. Maringolo
2017-09-15 2:47 GMT-03:00 Johan Brichau <[hidden email]>:
> You can also keep reference of the visited ‘pages' in the session state and
> generate the anchors with a css class to color them yellow.
> For example, if the links are in a menu component, you can keep the already
> visited menu items in the session state and render the menu items
> differently using that information.

This... or avoid using different colors for visited and unvisited
links, which makes totally sense in the context of hypertext documents
(e.g. Wikipedia like) but not in web applications (e.g. for a menu).

> I think that would be easier than hand-crafting the urls, unless you
> implement a complete ‘Seaside-Router’ package, which would be very
> interesting of course.

I've been thinking about something similar for a while, but isn't the
current "routing like" resolution done by the Session/Components
lookup?
It would involve a rewrite of the whole lookup. Maybe food for thought
for 4.0? :)

Regards!

Esteban A. Maringolo
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Problem with visited links

Johan Brichau-2

> On 15 Sep 2017, at 13:44, Esteban A. Maringolo <[hidden email]> wrote:
>

>> I think that would be easier than hand-crafting the urls, unless you
>> implement a complete ‘Seaside-Router’ package, which would be very
>> interesting of course.
>
> I've been thinking about something similar for a while, but isn't the
> current "routing like" resolution done by the Session/Components
> lookup?
> It would involve a rewrite of the whole lookup. Maybe food for thought
> for 4.0? :)


The way React-Router v4 works does feel like it would a good addition to Seaside.
What it boils down to is that the component tree of your application is determined by the url in the request.
I think it would be compatible but it would be limited to a special kind of WAComponent, as it would be Seaside-Router that is determining how components are wired and rendered.
Seaside has a lot more flexibility in general on how you do that.

I might be cryptic here (and possibly wrong ;) but if you take a look at React Router v4, I think you will feel the same.
But it’s not on my radar to do so.

cheers
Johan
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside