|
Subject:
|
Regions?
|
|
Posted By:
|
keithc
|
Post Date:
|
2/19/2006 10:26:55 PM
|
Was wondering what the differences are when using regions? Like when would you use a certain type of region over another. I have been using editable and it does fine for me but in the book there wasnt really an explanation on Optional/editable optional region/ or repeating regions that I can recall. I remember going through the editable region in cooking place but not the others. Thanks
|
|
Reply By:
|
Imar
|
Reply Date:
|
2/20/2006 12:08:07 PM
|
Hi Keith,
Editable regions are simple regions that can be changed by a client page.
Repeating regions define a common look for an item, like:
<li></li>
Child pages then draw a user interface that allows an end user to add and delete items, and reorder them (with plus, minus, up and down arrow buttons). For each item that is added the repeated region is, eeuh, repeated. For a repeatable item to be editable, it must contain an editable region; otherwise you simply repeat the static markup.
An optional region contains content that can be enabled or disabled in the client page. This allows the child page to determine whether an item is visible or not, but the template designer can determine what gets displayed.
Look in the help under the section "templates, types of regions" for a more thorough explanation of the different template features.
HtH,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|
Reply By:
|
keithc
|
Reply Date:
|
2/20/2006 1:10:05 PM
|
Hi Imar,
Thanks for the response. Reason I am asking this is I have created a main template for my site which includes Div's specified for my header, footer, nav menus, main content area. I made all of these Div's editable regions within the template. If I create a new page based off this template all works well. However when I add a menu Item say to the footer or the nav menu on the template itself, well when it updates pages based off of this template the change is not applied eventhough it states pages were updated? Any ideas?
|
|
Reply By:
|
Imar
|
Reply Date:
|
2/20/2006 1:14:25 PM
|
Is the stuff you add inside a editable region??
In that case, the page won't be updated, as it could potentially ruin all your pages by resetting the template content....
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|
Reply By:
|
keithc
|
Reply Date:
|
2/20/2006 2:08:30 PM
|
I was doing exactly that Imar. Thanks for this explanation it helped a ton.
|
|
Reply By:
|
Imar
|
Reply Date:
|
2/20/2006 2:34:27 PM
|
Instead of putting a lot of functionality inside templates, you can also take a look at ASP includes. I just wrote a short article about them here: http://Imar.Spaanjaars.Com/QuickDocId.aspx?QUICKDOC=381
ASP includes are not meant to replace DW templates, but you could use them next to templates to make it easier to update the site.
Hope this helps,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|
Reply By:
|
keithc
|
Reply Date:
|
2/20/2006 6:30:54 PM
|
Thanks for the link Imar I will check it out shortly. I was also just wondering if there is a way to create a non-editable region within an editable one? Thanks
|
|
Reply By:
|
keithc
|
Reply Date:
|
2/20/2006 8:55:10 PM
|
Imar that was a very cool read and i'd like to do this. I am curious though how it would work with a editable region? Say for example I created a <div = "content> </div> for my main content and applied "Editable region" to this particular div. Then I cut and pasted into an "include" file. How would I then add the content to this particular div like paragraph of text with the include being outside of the page I was working in? Or would my includes just be specific to regions that were not going to be edited? Hope I am makin sense here.
|
|
Reply By:
|
Imar
|
Reply Date:
|
2/21/2006 4:24:08 AM
|
You should use includes for repeating content that isn't editable in a child page.
If, for example, you look at this Wrox site, the header and the main menu are ideal candidates for an include. Inside Menu.asp for example you can determine what image to "preselect", as is the case with the P2P Forum button.
Since an ASP include applies to *all* pages that use it, it doesn't make much sense to have a child page override the content for that page.
Does this help?
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|
Reply By:
|
keithc
|
Reply Date:
|
2/21/2006 12:09:15 PM
|
Yes it helps Imar. I'm pretty bummed out though as I thought I was doing a decent job and my site looks good in IE at http:tektown.net:86 but I just looked at the site in Firefox and it looks like complete garbage. I feel like I just spent hours building a puzzle and someone came by and through the pieces all over the floor. I have no clue on how to approach fixing this.
|
|
Reply By:
|
Imar
|
Reply Date:
|
2/21/2006 1:35:33 PM
|
Ha, I understand exactly what you mean. Welcome to the wonderful world of cross browser development.
Tip of the day: Test Often and Test Early!!
Whenever I design a new page or template, I test in a couple of browsers. I don't test at the end, but at every important design phase.
I know this doesn't help you now, but it might help in the future.
That said, I think you got yourself in a bit of a mess. Let me diagnose some of the problems.
1. <?xml version="1.0" encoding="iso-8859-1"?> The XML prolog messes up the doc type, so I wouldn't be surprised if IE wasn't rendering in standards mode, but in quirks mode.
2. Why do you use mm as a unit of measurement? A mm works good on paper, but not on screen. Browsers are not smart enough to see how wide your screen is compared to its resolution to determine how "big" in pixels a mm should be. Use px or pt (for fonts) instead.
3. What's with all the important rules? You occasionally need one here and there, but you seem to be using them everywhere.
4. height:0px; There is no such thing as 0px. 0px has the same meaning as 0Elephants, 0Meter or 0Nothing Use height: 0; instead.
5. What's with all the overflow stuff?? Do you really intend to either clip the contents of the div or present scroll bars?
6. Overall design. I thought you were going to use a table instead? Although I admire your guts by trying to do this in pure CSS, you could have done this a long time ago with a single table (which would have worked in FireFox as well). Did you check out one of the samples you get when you search for "three column layout css" in Google? Did you use one of those as a starting point or did you start all over?
There is more to comment on, but it's a bit too much for me to explain in a single post, and it might ne a bit too much for you to digest at once... ;-)
Good luck and hope this helps,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|
Reply By:
|
keithc
|
Reply Date:
|
2/21/2006 3:47:56 PM
|
Thanks Imar,
1) I read on this and nevr thought of taking it out until now 2)Watched some video where the guy was using mm for measurements, not going to now. 3)The !important rules are there cause my left and right side column div's wont size down to my footer and I am still having this problem. my divs have border property applied and i was hoping the borders would stretch to 100% of page. It works this way on my site now but not in the offline copy I have that i am trying to get working with firefox. 4) Point taken will imply 0 from now on (I been so concerned with just trying to get the site layout done that i havent tended to details) 5)I hate scrollbars but I know of no other way to put a large amount of data in a <div> tag that users can move the text up and down in without overflow scroll bar useage. 6)Our existing site is tabled and besides if it can be done I'd rather take the CSS approach. I have based my site off this Imar Ii found a good one and II have learned alot from it but i cant seem to get my site working with it. Check it out bud http://bonrouge.com/3c-hf-fluid.php 5)
|