I am building a website using Instantiation VisualAge Smalltalk Seaside. I know about the following.
renderContentOn: html
html anchor
url: 'http://www.seaside.st';
with: 'Visit the Seaside'.
However, I want to make a link where an image is the clickable item and some descriptive text below. What I am doing at the moment is building this in html and having Seaside render the code. I would like to use Seaside to build the item in the same way as above but cannot find any hints. The code I use is like this:
html html: '<a
href="http://www.mywebsite.com:8080/Show some details?', imagePath, '"><img
style="border: 0px solid ;
text-align: right;height: 130px;" alt=""
src=" http://www.mywebsite.com:8080/images/', imagePath, '"></a>
<br> some text'
Is there a better (and more Smalltalk) way?
'Show some details' is my sloppy typing. It is, of course, a valid class name.
However, I have tried this but following 'html text: 'Some text'.' which should just display the text , it also presents the current page class - So, if my class was DPAClassName so url: 'http://www.mywebsite.com:8080/Show some details?, imagePath'; becomes
url: 'http://www.mywebsite.com:8080/DPAClassName?, imagePath';
the display shows the text 'Some Text but as follows: 'Some Text'DPAClassName
The key is in the
with:message send to any tag (anchor,image,paragraph, etc.), you can pass any renderable object to it. In your first example you passed aString, but you can also pass aBlockClosureor any other object that understandsrenderOn:.So, summarizing, the equivalent to what you want would be:
As a side note, I think the
Show some detailspart of the URI is questionable, as well as passing the imagePath without naming the parameter. But that is certainly something outside of the scope of your question.