The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 'Master pages' in a hand-coded workflow, Replicating a WYSIWYG template system... without WYSIWYG
ricklecoat
post Jul 23 2007, 09:12 AM
Post #1





Group: Members
Posts: 3
Joined: 23-July 07
Member No.: 3,415



Hi all, first post to this forum.

For the last few years I've been designing sites in Adobe GoLive (for better or worse). I've recently taken the plunge and ditched the WYSIWYG editors in favour of standards-based hand-coding, for which I'm using Panic's new text editor for the Mac, 'Coda' (which I find excellent by the way).

Thing is, whilst I don't miss all the palettes, toolbars and drop down menus/wizards that GoLive provided, I do miss the ability to create templates for my pages, ie. a master page which, when amended, will update all the pages based upon it. I realise that such a mechanism is a part of the application itself, not an inherent part of HTML, and that, as such, each app will handle it differently. But I wondered if anybody had a solution that would provide a similar functionality within a simple text-editing workflow. Coda provides many great tools for hand-crafting HTML (and CSS, Javascript, etc) but it does not go as far as template management.

Basically I'm looking for a way to incorporate an external 'snippet' of HTML into other pages in a dynamic way such that updating the snippet will update the page.

I'm not hopeful of finding a solution (at least not one that doesn't involve a ton of scripting which is not what I'm after because I don't want the final pages to hold a lot of script that is only used during development). But I thought I'd ask.

Anyone have any ideas?
Thanks in advance;

Rick
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jul 23 2007, 09:40 AM
Post #2


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



See the FAQ entry How do I include one file in another?.

I've heard about Coda, but I prefer BBEdit, excellent for html and scripting. Or the free TextWrangler, practically the same as BBEdit, and by the same company Barebones. Both for Mac only.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ricklecoat
post Jul 23 2007, 10:05 AM
Post #3





Group: Members
Posts: 3
Joined: 23-July 07
Member No.: 3,415



Thanks Frederiek;

I took a quick glance at the page you directed me to and I'll take a closer look later on. First impressions are that it doesn't provide quite what I'm after, but I think that is probably down to me not explaining myself well in my original post. I'm looking for a solution that updates the child pages from the parent 'master page' during development, rather than when they get served to th browser -- ideally the pages should have no more extra code than a couple of lines along the theme of "area linked to template starts here" and "area...ends here". But like I say, this is something normally handled as a part of big bloated editing apps, so I'm not really expecting a solution in the form that I'm looking for it.

Re. Coda, I do like it, if only for the fact that the inbuilt browser preview updates as I type or, in the case, of a linked stylesheet, when I save. Very handy.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 23 2007, 10:24 AM
Post #4


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



QUOTE(ricklecoat @ Jul 23 2007, 05:05 PM) *

I'm looking for a solution that updates the child pages from the parent 'master page' during development, rather than when they get served to th browser -- ideally the pages should have no more extra code than a couple of lines along the theme of "area linked to template starts here" and "area...ends here".

IMO there's no big practical difference. In the first case you might use a preprocessor as suggested by the FAQ entry, which will then upload complete pages to the server. In the second case you might upload files with SSI or PHP inclusion directives, which the server combines with the included content before the complete page is served to the user. In both cases you'll need a simple inclusion directive in each content file.

A third method is to use an online database, where a single template is given various content depending on the URL query string used. This is practical on sites with e.g. large numbers of basically similar product pages.
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ricklecoat
post Jul 24 2007, 04:51 AM
Post #5





Group: Members
Posts: 3
Joined: 23-July 07
Member No.: 3,415



QUOTE(Christian J @ Jul 23 2007, 10:24 AM) *

IMO there's no big practical difference. In the first case you might use a preprocessor as suggested by the FAQ entry, which will then upload complete pages to the server. In the second case you might upload files with SSI or PHP inclusion directives, which the server combines with the included content before the complete page is served to the user. In both cases you'll need a simple inclusion directive in each content file.


Thanks Christian, I'll look into inclusion options. Not *quite* what I was looking for (presumably I wouldn't see the 'complete' page during development, only when it gets to the browser and only then if it's on the server as opposed to viewed locally) but might be some sort of a workaround.

I'm actually finding that the lack of templating options is the one of the two biggest hurdles for me to overcome in moving from WYSIWYG to hand coding (the other is site management, ie. having an indication of which assets are 'in use' and which are not). Of course I could type my code by hand into a WYSIWYG editor like Dreamweaver to regain both these facilities, but that does seem slightly absurd.

Thanks again.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 24 2007, 02:56 PM
Post #6


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



QUOTE(ricklecoat @ Jul 24 2007, 11:51 AM) *

only then if it's on the server as opposed to viewed locally

You can run a server locally/offline. I think Mac OS comes with the Apache server preinstalled, maybe also with the PHP module?
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 10:17 AM