Okay i have a website that i created a list of images from a view but i cant really control any break points.SInce i cant explain it 100% lemme give an Example.
In php I would get a list of images in an array then use the modulus operator to split the items IE
if ($i%3 == 0) {
$str .= “”;
}
WHich would add that string on every 3 lements so its in a nice neat table…
ANyone understand what im wanting to do and have an i dea on how i can use my view to accomplish this? Im not versed in lotusscript so thats a big drawback at the moment too ;-(
Its using an embedded view using HTML.Im not wanting to Limit the number of entries, Im wanting to make the entries display in a grid fashon and not just a list.
Here is an html example
IMAGE
IMAGE
IMAGE
IMAGE
IMAGE
IMAGE
NOw the ONLY way i can do that is to FIgure a way to use the modulus operator within the VIEW formula.
I saw the other solutions, but I think there’s an easier solutions if I understand well. Seems very complex, but it’s easy and more powerfull. You’ve a documents with a views and you want to see the image from this documents.
The best thing is create an Agent in webqueryopen, and this form you put a field. In the agent you use
set doc=session.documentcontext
and put in this field the HTML code source with table.
doc.Field1=“
” “”
for i=1 to 3
doc.Field1=doc.Field1(0)+“
”+(the code of the image)
Next i
The code of the image is A655A56B4EB48F6CC1256CA0002F7115/$File/028696.jpg
In this example you can see the code is DocumentID/$File/nameoftheimage.
Which this rules you can compose the image which you want, the name of the image you can find which embeddedobject or when you construct the structure with the photos you can save the name of the image in other field.
If you were to take all of your images and write the html like this:
.
.
Then every image will appear to the right of the previous image and would automatically flow to the next line. A person with a higher resolution setting on their monitor would see more thumbnails across the page than a user with a lower resolution setting. This way you don’t hardcode how many columns across but instead let it automatically adjust to the browser.
For each “hard break” that you want to make, use the CSS clear property. You might want to do this per document and thus you could put a blank div tag at the end of each set of graphics per document.
So you want to show three images across each “row”? Is that right? Not too hard. Just dump pass-thru HTML in each of three columns. The first should do this:
All this does is make table after table on top of eachother… This is not what
i want. I wanna display 3 items in a row then to break to a new line.
I can put teh
items around the embedded view to handle the container.
Sure, but let the view and its $$View Template form define everything: instead of each row being its own table, make each row just that… a row. You can then wrap your embedded view in opening and closing table tags to result in a complete table. Here are some screens to show you what I mean:
$$ViewTemplate for your view, with the view embedded
$$ViewTemplate for your view, with the view embedded (set to display as HTML)