Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/17/2008 10:46 AM |
|
Scott,
I need to open up the simple layout discussion again. I have found the table method limiting when faced with logical style-based layouts. The latest wall, for instance, is the photo gallery layout of the Property Agent module. The current method relies on tables but this is a direct violation of the intended use of tables.
Can I help you create stands compliant layouts for the default templates? I am willing to commit some free time to Ventrian to make the modules xhtml compliant. I have extensive experience working with CSS, logical layouts and the Ventrian modules.
Sincerely,
Lance |
|
|
|
|
goBlanks Gold Membership
 Nuke Wiz Posts:158

 |
| 6/17/2008 7:17 PM |
|
Got my vote for this! I've stripped out all tables thus far except for that beautiful photo layout you are talking about Lance. I just can't bring myself to do it just yet. I've gone as far as using the photo layout style elsewhere in my site but would love a solution to remove all the tables.. |
|
My DNN Projects: NortheastOK.com, goBlanks.com |
|
|
Scott McCulloch Administrators
 Nuke Master Posts:12446


 |
| 6/17/2008 11:18 PM |
|
| Sure - what do we need to get started Lance? If you could provide a sample layout for the photos than that would be a good start. I actually have a starting point from another project if you wanted to see that. |
|
Scott McCulloch Site Administrator |
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/18/2008 1:45 PM |
|
One place to start is to figure out the best repeater format. Some ideas are:
· divs with the class "firstphoto" (“first” is too ambiguous and likely to inherit template style) on the first item in a row for a line break.
· Span around row elements. The CSS clear fix is required.
· UL, LI sets
· Fall back to tables for backward compatibility
To create faux columns with div and li, the element width needs to be set to the width of the thumbnail + desired padding. How to get this value into the style sheet is a bit of an issue since template.css is static (DNN weakness IMHO). One approach might be to inject embedded CSS overrides into the page head.
I guess the best would be a selection of repeater templates. (repeater start, repeater item repeater end) then users have complete control. This requires some re-coding however. I understand .net 3.5 has better repeaters built in. Is it too early to try these?
I have a few ideas for the photo frames from here (elegant, lightweight and simple), here (flexible and transparent), and here (clean code but fixed width) just to start.
The next thing to tackle is the layout. I have two ideas for this as well coming from two CSS projects; YUI (Yahoo user interface) and Blueprint.
YUI has been built to make publishing on their site and contains hundreds of layouts for minimal code.
Blueprint use a different approach by creating a conceptual grid on the page and CSS mark up to set elements sizes. It has far more specific control over the layout then YUI which relies on nesting.
Obviously you can’t count on either being installed but elements of both can make very robust layout options that regular users can get their minds around. They also provide advanced users many preinstalled options and tons of support in their respective communities.
Both are excellent to work with and I highly recommend you explore them for your next skin design! Due to the nested requirements of the YUI grids, they may not be best solution for this module.
Layout method is certainly an area for discussion. It would be good to know how much flexibility you want in the module out-of-the-box. If you only want to present the basic layouts then we could write custom markup and let advanced users try the other ideas. |
|
|
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/18/2008 2:12 PM |
|
My thoughts on ideal, semantically correct, photo gallery code would be: < div id = "PhotoGallery"> // repeater start < div class=" firstPhoto">< img… />< /div> // repeater first item in row < div class="photo">< img... />< /div> // repeater item < div class="photo">< img... />< /div> < div class=" firstPhoto">< img />< /div> < div class="photo">< img... />< /div> < div class="photo">< img... />< /div> < /div> // repeater end It would be best in one template like this ... < table id = "Photogallery"> < !-- begin row --> < tr > < !-- begin item --> < td class="photo">[photo]< / td> < !-- end item --> < / tr> < !-- end row --> < / table > … so that all the parts are in one file. Perhaps mimic XSL style mark up? Could that work? Could XML itself work? |
|
|
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/18/2008 4:07 PM |
|
here is a new and interesting way to layout things... http://www.alistapart.com/articles/fauxabsolutepositioning |
|
|
|
|
caroig Gold Membership
 Nuke Master Posts:278

 |
| 6/20/2008 2:33 PM |
|
Hi,
Great thread.
My vote is for an unordered list for photos. Perhaps three tokens would be ideal:-
[MAINPHOTO] Would just generate the 'first' photo - no need for markup as it can be wrapped in a DIV or other element in the template.
[ALLPHOTOS] Would display all photos as - the could be defined in the template so that a class or id can be added. Perhaps it could be a token option to created the list with the UL or without.
[CHILDPHOTOS] As for [ALLPHOTOS] but would not include the main photo.
That would fulfill all my requirements :-) |
|
|
|
|
caroig Gold Membership
 Nuke Master Posts:278

 |
|
caroig Gold Membership
 Nuke Master Posts:278

 |
| 6/20/2008 2:49 PM |
|
Ooops, try again.
[MAINPHOTO] Would just generate the 'first' photo - no need for markup as it can be wrapped in a DIV or other element in the template.
[ALLPHOTOS] Would display all photos as a list items (wrapped in an LI) with no UL generated so that a class or id can be added. Perhaps it could be a token option to created the list with the UL or without.
[CHILDPHOTOS] As for [ALLPHOTOS] but would not include the main photo.
That would fulfill all my requirements :-)
This PA module use an unordered list to display the photos (the tables are removed by a little jQuery) |
|
|
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/20/2008 4:37 PM |
|
LIs can certainly be good to work with and ther are lots of resources available. I would hesitate breaking up structures however. The UL and LI should be the in same conceptual area(s) as should table code etc. I would also like to retain the option of using other markup that doesn't inherit so many properties from the browsers.
It sounds from your tokens and descriptions that you want better control over the first image. Perhaps, you have specific styles and uses for the main image and don’t want the duplication of using the existing tokens? Would it be enough to be able to toggle off the first image from the gallery? Basically, as you have stated for CHILDPHOTOS although that implies a hierarchical relationship. This way, the gallery won’t duplicate the content and you gain full control over how the first image looks and acts in the template with existing tokens.
I would suggest this is a separate requirement, however, from the gallery markup which is meant to be a series of clickable photos. The first photos in my examples are merely for controlling when the images wrap onto the next row.
|
|
|
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/20/2008 4:40 PM |
|
Scott, Is it feasible to have the XML style templates? Can all the code be in one place? |
|
|
|
|
caroig Gold Membership
 Nuke Master Posts:278

 |
| 6/21/2008 1:19 AM |
|
Posted By Lance Long on 6/20/2008 4:37 PM
LIs can certainly be good to work with and ther are lots of resources available. I would hesitate breaking up structures however. The UL and LI should be the in same conceptual area(s) as should table code etc. I would also like to retain the option of using other markup that doesn't inherit so many properties from the browsers.
Perhaps, you have specific styles and uses for the main image and don’t want the duplication of using the existing tokens? Would it be enough to be able to toggle off the first image from the gallery?
We may be talking at cross purposes, but the majority of PA implementations need at least to be able to identify 1 main photo to be treated differently depending on the view (especially summarized views - list views etc). If you need to take one out, then it's pretty logical extension to say you might want the rest bar that one in some circumstances.
I could toggle off the photo in my CSS - but I'd prefer it not to be sent client in the first place.
The 'optional separation' of 'first' and 'other' photos (you're right there is no hierarchy) matches closely to the current model - less pain for everyone.
I'd agree that xml would have been a good approach, but the current template structure is simple and obvious, easy to tweak and nicely consistent across modules.
I don't share your concerns with breaking structures. As long as they are easy I'm not too concerned what the templates look like or if they conform to a standard. I just want the template to generate validated html without the current table bloat. |
|
|
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/21/2008 9:24 AM |
|
Caroig,
My response regarding the splitting of code came from two things:
- That you put the UL code in the View Item template. In that case, one would have separated the items between different functions not just different files. This is a dangerous route as they become dependent on each other. For instance, if you wanted to put the gallery in the listing template then it should work and act on its own by supplying the token. It might seem easy to just copy the UL to the new template but it would be error prone and limiting.
- Your suggestion that the module would output a list LIs. This limits the function to the UL, LI method only which I believe would cause problems down the road. Semantically it makes some sense that the photo are Line Items but if a user want to use Divs for another version of the layout (for instance, an elastic arrangement) then they should be free to do so.
IHMO
However, I believe we are in agreement that:
- The templates should be made lighter and standard compliant by replacing the tables with CSS layouts. The only barrier to this now is the method used for repeating the images.
- The first image in the gallery should be treated differently so that people can style them specifically.
To be clearer, by 'toggle' I meant the gallery token would not add the first photo - not a CSS method. Once removed (skipped?), the user could apply all the special styles they like using the view item photo tokens. This includes the code to launch Lightbox etc. I also think this is a seperate thread from making the templates standard compliant. |
|
|
|
|
avi a Gold Membership
 Nuke Master Posts:653

 |
| 6/21/2008 10:15 AM |
|
that's what I think:
******** head *******
< ul id="view_photos" >
< li id="first_photo" > some link < / li >
******* body *************
< li style=" width:[PHOTOWIDTHMEDIUM] ; height:[PHOTOHEIGHTMEDIUM] ; float:left;"> some other link < / li >
********* footer ***********
< /ul >
|
|
Avi A Nukedesigners.com W3C valid skins for dotnetnuke |
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/21/2008 11:07 AM |
|
That is a good start Avi a, there is one problem however - how do you create rows? There are two ways I see useing ULs ...
< ul> // row one
< li>item< /li>
< li>item< /li>
< /ul>
< ul> // row two
< li>item< /li>
< li>item< /li>
< /ul>
or
< ul>
< li class="NewRow">item< /li>// row one
< li>item< /li>
< li class="NewRow">item< /li> // row two
< li>item< /li>
< /ul>
The benefit of the second is you can remove the style for NewRow to create elastic/liquid/mobile layouts. A row becomes a style definition then versus a data definition leaving the presentation up to the client. Both, however, address how to create the rows. I think the gallery will require templates for Head, Row, Item and Footer. There could be a way to have the row and item templates combined if there were the right tokens:
< li [iSNewRow: class="NewRow"]>item < /li>
All this depends on how Scott wants to change the code. |
|
|
|
|
avi a Gold Membership
 Nuke Master Posts:653

 |
| 6/21/2008 11:50 AM |
|
i'm not sure I understand what do you mean. (rows) If the width of the wrapping container is let's say 480px. If your [PHOTOWIDTHMEDIUM] is 120px it will render 4 rows. This is for a basic built in template. This is used to make it automatically. Scott can add < spans > inside the "li"s for other photos template includin other custom fields. For example if you want to show each time one photo floating to left, title on the right, long description floating next to image etc". |
|
Avi A Nukedesigners.com W3C valid skins for dotnetnuke |
|
|
avi a Gold Membership
 Nuke Master Posts:653

 |
| 6/21/2008 12:01 PM |
|
It will work graet with that token:
[IMAGE:xx:yy]
So if the defaults for example will be [PHOTOWIDTHMEDIUM] = 160px (height is less important)
and:
[IMAGE:xx:yy] = 140px:140px
then this:
< li style=" width:[PHOTOWIDTHMEDIUM] ; height:[PHOTOHEIGHTMEDIUM] ; float:left;">
should be replaced with this:
< li style=" width:[PHOTOWIDTHMEDIUM] ; height:[PHOTOHEIGHTMEDIUM] ; float:left;padding:10px;">
will creat the padding stuff. |
|
Avi A Nukedesigners.com W3C valid skins for dotnetnuke |
|
|
caroig Gold Membership
 Nuke Master Posts:278

 |
| 6/21/2008 12:08 PM |
|
Well, how about if we can specify a token to repeat whatever html we include (for repeating items). If it's photos I also want to be able to assign my ALT and TITLE properties - so excuse the wrong brackets and dodgy syntax [REPEATER:{li}[PHOTO:TITLE=[CUSTOM:TITLE],ALT=[CUSTOM:TITLE]]{span}[CUSTOM:TITLE]{/span}{/li}] Hey but I still want the three tokens MAINPHOTO, ALLPHOTOS and ALLEXCEPTMAINPHOTO !! This would work for list items as well. I'd agree with avi except for a recent implementation where the photos were different widths - so yes perhaps an additional class on the top level repeated element (in the above case the LI). |
|
|
|
|
avi a Gold Membership
 Nuke Master Posts:653

 |
| 6/21/2008 12:17 PM |
|
An optional/default [PHOTOSWIZARD] in the photos item.
Basically I think all what I described can be made with 4 questions in the layout settings photos :
use wizard? yes/no
the full frame width: ___px
sidepadding :__px
the full frame height:___px
vertical padding:__px
It will generate the "li" I was describing earlier .
What do you think? |
|
Avi A Nukedesigners.com W3C valid skins for dotnetnuke |
|
|
Lance Long Registered Users
 Nuke Wiz Posts:131


 |
| 6/21/2008 12:43 PM |
|
Caroig; is not the case that the existing PHOTO tokens would work as your MAINPHOTO? From my experience, I'm able to do many interesting things with these tokens.
Avi a: you are touching on a main criteria - whatever is decided, lower skilled users should be able to control the appearance of the gallery. This is where the rows and columns come in. In the current version there is a sett ing "Items Per Row:" I want to replicate this so the new version is backward compatible. |
|
|
|
|