Re: [BlueGriffon] Where should I keep site wide shared stuff (like menus,copyrights, and layouts)? (Like Master Page on Freeway or INCLUDE files in programming)

265 views
Skip to first unread message

Greg Chapman

unread,
Jan 17, 2013, 8:03:04 PM1/17/13
to blueg...@googlegroups.com
Hi Mike,

On 17 Jan 13 11:47 Mike Tossy <mike...@gmail.com> said:
> So far I am at a loss as to how/where to put code that all pages
> should share.

BlueGriffon has no "master page" feature of the kind you describe.
Neither of the add-ons, "One-click Templates" and "Snippets", which
you might think offer something akin to what you want come close to
what you seek.

> What I do not want to do is copy that shared code and then have to
> find and edit edit all the copies. That is too time consuming and
> error prone.

It needn't be time consuming or error prone.

> (Include files are frequently used to accomplish something similar
> in programming languages.)

If doing it locally with a multi-file editor does not appeal then the
answer is, as you suggest, to use PHP to build your site using
server-side includes.

> I thought of using templates but, if I have read the postings
> here correctly, templates seem to be only read at the time of page
> creating and updating a template only seems to change pages made in
> the future, but not ones made in the past.

BlueGriffon uses the term "templates" to describe a facility for
styling content. It is NOT a facility for managing content on a page.

> How are others doing this?

1. Be very clear about the difference between content and styling.

2. Plan well - so there is rarely a need to add/change standard
content throughout a site.

3. Use an external stylesheet for styling content.

4. On the rare occasions when a sitewide update is required use the
"find and replace" facility in a multi-file text editor to change/add
any menu items or change a copyright date.

Greg Chapman
http://www.gregtutor.plus.com
Helping new users of KompoZer and The GIMP
Still exploring BlueGriffon

Mike Tossy

unread,
Jan 17, 2013, 9:30:20 PM1/17/13
to blueg...@googlegroups.com
Hi Greg

Thank you for your reply!


On Thursday, January 17, 2013 5:03:04 PM UTC-8, GregTutor wrote:
Hi Mike,

On 17 Jan 13 11:47 Mike Tossy <mike...@gmail.com> said:
> So far I am at a loss as to how/where to put code that all pages
> should share.

BlueGriffon has no "master page" feature of the kind you describe.
Neither of the add-ons, "One-click Templates" and "Snippets", which
you might think offer something akin to what you want come close to
what you seek.

Then I would like to make it an enhancement request.  It is a very powerful concept that, once they experience it, I think users will wonder how they lived without.  Is there a formal process to make an enhancement suggestion?
 

> What I do not want to do is copy that shared code and then have to
> find and edit edit all the copies.  That is too time consuming and
> error prone.

It needn't be time consuming or error prone.

Even with a good external multi-file editor, it is easier to not miss a case or miss-correct a case if this is handled within the BG tool.

> (Include files are frequently used to accomplish something similar
> in programming languages.)

If doing it locally with a multi-file editor does not appeal then the
answer is, as you suggest, to use PHP to build your site using
server-side includes.

Am I missing something? Server-side includes seems to defeat the principle advantage of using a WSIWYG tool.
 
> How are others doing this?

1. Be very clear about the difference between content and styling.

2. Plan well - so there is rarely a need to add/change standard
content throughout a site.

The site I mentioned in my intro was first built in 1995, 17 years ago, and has evolved steadily.  I respectfully suggest no amount of planning can prevent change over that time frame.  Technological, business, and cultural changes have caused several major rewrites.  Since the adoption of the master page concept we have been able roll out these major rewrites incrementally, which has been a big win for the customer.

3. Use an external stylesheet for styling content.

Yes, I agree that is a good practice that I would like to adopt.

4. On the rare occasions when a sitewide update is required use the
"find and replace" facility in a multi-file text editor to change/add
any menu items or change a copyright date.

The testing burden alone is scary.  It is a shame that BG doesn't handle this is in an integrated fashion. Especially if there is any interest in encouraging non-programming users.
 

Greg Chapman
http://www.gregtutor.plus.com
Helping new users of KompoZer and The GIMP
Still exploring BlueGriffon
 
Thanks again for your reply.  I appreciate your time!

Mike

Greg Chapman

unread,
Jan 18, 2013, 5:51:55 AM1/18/13
to blueg...@googlegroups.com
Hi Mike,

On 18 Jan 13 02:30 Mike Tossy <mike...@gmail.com> said:

> > BlueGriffon has no "master page" feature of the kind you describe.
>
> Then I would like to make it an enhancement request. It is a very
> powerful concept that, once they experience it, I think users will
> wonder how they lived without. Is there a formal process to make an
> enhancement suggestion?

I'm relatively new here and not sure of the preferred process. I
assume Daniel reads all messages posted and will take feature requests
into account in his development programme.

> Even with a good external multi-file editor, it is easier to not
> miss a case or miss-correct a case if this is handled within the BG
> tool.

I do accept that having an internal tool would be preferable.

> Am I missing something? Server-side includes seems to defeat the
> principle advantage of using a WSIWYG tool.

I think that depends on the nature of the sites you build and one has
to bear in mind the way the web development market has grown in the
last 17 years. These days many that want to avoid hand coding will
turn to CMS tools, such as WordsPress and Joomla, to develop their
sites, especially if they require the script-driven bells and whistles
that they offer. Others will need shopping carts and similar
facilities that are database driven and rely on server side includes.

Many of these other tools produce code that is pretty dire, but are
tolerated by modern browsers. BlueGriffon is one of a small number of
WYSIWYG tools that is aimed at producing code that is fully compliant
with W3C standards. In some cases this does make it difficult for
BlueGriffon's author to provide a smooth yet fully WYSIWYG interface.

It's why I see a tool like BlueGriffon is best conceived as a teaching
tool, to give a user a gentle introduction to raw code, expecting them
to move towards that form of site development in due course - where
server side includes would be the norm and a "master page" facility
becomes a redundant concept. Those that don't worry about the
underlying code, will jump ship from BlueGriffon and move towards CMS
tools.

> The site I mentioned in my intro was first built in 1995, 17 years
> ago, and has evolved steadily. I respectfully suggest no amount of
> planning can prevent change over that time frame.

True enough! But in that case, it's also probably time for a rebuild
from scratch, in order to re-code the site so it is both efficient,
fast loading, and takes advantage of current best practice in coding.

> Technological, business, and cultural changes have caused several
> major rewrites. Since the adoption of the master page concept we
> have been able roll out these major rewrites incrementally, which
> has been a big win for the customer.

I do take your point. I am not saying that I wouldn't find a
template/master page facility a useful addition to the program.
BlueGriffon's predecessor, Nvu, did have the beginnings of one -
however, it was incomplete and didn't allow the update of existing
pages - making it largely useless. Given its state of development I
supported its removal from BlueGriffon - it just caused confusion in
new users.

Dominik Lenné

unread,
Jan 18, 2013, 10:12:53 AM1/18/13
to blueg...@googlegroups.com
Actually, there is a formalized enhancement requirement process, via bugzilla:

http://bugzilla.bluegriffon.org/

Get yourself an account, check wether there is already a similar request , open a new issue, choose e.g. "add ons", put in a precise definition of your idea and change "severity" onto "enhancement".

Dominik Lenné

unread,
Jan 20, 2013, 7:32:13 AM1/20/13
to blueg...@googlegroups.com
I use a pure HTML-Editor (Phase 5), quite old, but it has client side includes. These are fields in the template, which can be edited at one place for all pages of a site which contain them and then automatically updated in all pages. Not exactly a master page but something approaching it.

Seems, that this is an important plugin idea.

Mike Tossy

unread,
Jan 23, 2013, 9:19:09 PM1/23/13
to blueg...@googlegroups.com
Irina

Thanks.  And, you are SOOO right ;-)  about the importance of mobile browsing support / templates / compatibility. It is one of the reasons I went looking for a new tool.

Mike

On Saturday, January 19, 2013 3:55:53 AM UTC-8, Irina Gray wrote:
Mike, 

I absolutely and completely agree with you. 

I really like the look and feel of BlueGriffon but it is pretty unusable even for a simple website (like a couple of mine) if I cannot use a "master page", or a "template". 

Mike, you are SOOOO right about this idea. I, too, have had my sites for many years now and having developed them based on master pages / templates has been an absolute savior time-wise and sanity-wise. 

Here is my take on it - for BluGriffon developers:

1. If you want to make this project a real success, model your software on Dreamweaver 8 and Expression Web 4. These are the two apps that have been fantastic but have been discontinued. Dreamweaver now is a bloated monster that 90% of simple website designers don't need. But they loaded it most likely to make it more expensive. And Expression Web is cool, but has also been discontinued. I have just backed up Expression Web for future installations on my laptop if required. 

2. Introduce mobile-browser templates / compatibility in one way or another. This is, of course, a huge issue these days. Don't miss it, make it work and you'll see how popular it will become. 

These are the 2 features you need to focus. For basic websites, people really don't need anything else.

Don't try to re-invent the wheel. Everything is already there. Just take it, put it in a nice format and see its popularity grow. 

Hope this helps. 

I will use BlueGriffon if it has this type of functionality and will be happy to make a donation. 

Best wishes, 
Irina 



On Thursday, 17 January 2013 11:47:53 UTC, Mike Tossy wrote:
A bit of an intro:
This is my first post and I am just trying out BG so please excuse my probable ignorance. My background is from using Freeway (a Mac only WYSIWYG tool for building websites.)  I have built several websites over the years using Freeway and am generally happy with it; but it is getting "a little long in the tooth".  (See www.GalapagosTravel.com for an large example of what I have done using Freeway.)  I also have some coding experience (Java) and a little CSS experience.

I am exploring BG to see if I should make the switch.  I already see a few advantages being price and multi-platform support.  

Here is my question:

So far I am at a loss as to how/where to put code that all pages should share. In the sites I have built, there are elements which you want to share across most pages on the site.  A simple example is a footer that has a copyright date, a "contact us" link, and a "privacy policy".  Another example is a header which may include a standard graphic and menus.  Or you might have a menu as a column.  Key here is that this information will change over time as the site evolves, needs change, laws change, or simply styles change.)  What I do not want to do is copy that shared code and then have to find and edit edit all the copies.  That is too time consuming and error prone.

(This is solved in Freeway by using a "master" page.  All Freeway pages are derived from a master page and the site pages inherit elements from their master page.  When, for example, you need to update a menu because you added a new page. Assuming that you put you menu in the master page, you simply go to the master page and update the menu there and that causes all the inheriting pages to be updated.)

(Include files are frequently used to accomplish something similar in programming languages.)

In BG, I thought of using templates but, if I have read the postings here correctly, templates seem to be only read at the time of page creating and updating a template only seems to change pages made in the future, but not ones made in the past.

I'm not sure how or if CSS can be used to accomplish my objective.  If they can, could someone point my in the correct direction?

Is there some other mechanism in BG that can be used to solve this?  How are others doing this?

Thanks!

I doubt I'm the first person with this problem. I thank you for any help.  Sorry if this turns out to be a "stupid" question with an obvious answer.

Mike Tossy

unread,
Jan 23, 2013, 9:25:16 PM1/23/13
to blueg...@googlegroups.com
(Just to be clear about "new tool", what I mean is that I started looking at BlueGriffon (the "new tool") to replace Freeway (the "old tool").

Mike Tossy

unread,
Jan 23, 2013, 9:31:20 PM1/23/13
to blueg...@googlegroups.com
Interesting idea!  How was it represented in the source code?

As far as theI think I know how to write up the visual (WYSIWYG) requirements.  I'm not sure of the representation in the source (HTML).
.

Daniel Glazman

unread,
Jan 24, 2013, 3:28:30 AM1/24/13
to blueg...@googlegroups.com
On 19/01/13 12:55, Irina Gray wrote:
> Mike,
>
> I absolutely and completely agree with you.
>
> I really like the look and feel of BlueGriffon but it is pretty unusable
> even for a simple website (like a couple of mine) if I cannot use a
> "master page", or a "template".

Eh. We know.
Why do you think we updated the One-Click Templates add-on?
The new version of the One-Click Templates add-on lets you save any web
page as a Personal Template, reusable in one click... So build your own
template, save it as such, reuse it all over the place.

http://www.bluegriffon.com/index.php?pages/One-click-Templates

</Daniel>

Greg Chapman

unread,
Jan 24, 2013, 6:16:59 AM1/24/13
to blueg...@googlegroups.com
Hi Daniel,

On 24 Jan 13 08:28 Daniel Glazman <daniel....@gmail.com> said:
> Eh. We know. Why do you think we updated the One-Click Templates
> add-on? The new version of the One-Click Templates add-on lets you
> save any web page as a Personal Template, reusable in one click...
> So build your own template, save it as such, reuse it all over the
> place.

The key feature the original poster was looking for was a mechanism
within BlueGriffon for updating content - such as a copyright date or
company address or telephone number - that appears on every existing
page on a site.

Unless I've misunderstood, that is still lacking even with the new
template feature.
Are you saying the new "personal template" does have a mechanism for
updating content on existing pages retrospectively. I thought it would
only update the styling, not content.

Joeg

unread,
Jan 24, 2013, 7:50:32 AM1/24/13
to blueg...@googlegroups.com
I use the 'Snippets' add-on to do this. If you put a placeholder on your template as plain text say 'contact_details' you can double-click it to select it then insert the snippet to replace that placeholder. The snippet is just a line or two of HTML which you can copy and paste from another WYSIWYG page. Personally, I find snippets one of the most useful features in BlueGriffon - although the documentation could be improved to show the possibilities.


Greg Chapman

unread,
Jan 24, 2013, 8:18:38 AM1/24/13
to blueg...@googlegroups.com
Hi Joeg,

On 24 Jan 13 12:50 Joeg <joegille...@gmail.com> said:
> I use the 'Snippets' add-on to do this. If you put a placeholder on
> your template as plain text say 'contact_details' you can
> double-click it to select it then insert the snippet to replace that
> placeholder.

I have not bought either One-click Templates or Snippets, and can only
rely on the descriptions on bluegriffon.com and may not fully
understanding their capabilities.

However, doesn't your method still only work on new pages? Can you
really update all existing pages with a single replacement action? I
assumed that you would need to update each pre-existing page
individually.

The only way I know To achieve what the original posters wanted, is to
use an external multi-file text editor and search and replace blocks
of code across a set of pages loaded into the editor (or found on
disk). Unfortunately, even in 1.6, the search and replace function
does not operate across multiple files.

Dominik Lenné

unread,
Jan 24, 2013, 9:47:38 AM1/24/13
to blueg...@googlegroups.com
@ Mike Tossy, concerning client side includes in phase 5:

An example:

  <!--include:bottomlinkline.inc -->
  <div class="bottomlinkline">
    <a href="index.html" target="_parent">Home</a>
    | <a href="neu.html">Neu</a>
    ............andsoonandsoforth................
  </div>
  <!--/include:bottomlinkline.inc -->


Then ther is a file "bottomlinkline.inc" in a directory to be named in the project options with everything between the "include"-comment-lines. Change the ".inc" - file and click on "update all includes" - done.

Marc Sabatella

unread,
Jan 24, 2013, 10:29:39 AM1/24/13
to blueg...@googlegroups.com
On 1/24/2013 6:18 AM, Greg Chapman wrote:
> I have not bought either One-click Templates or Snippets, and can only
> rely on the descriptions on bluegriffon.com and may not fully
> understanding their capabilities. However, doesn't your method still
> only work on new pages? Can you really update all existing pages with
> a single replacement action? I assumed that you would need to update
> each pre-existing page individually. The only way I know To achieve
> what the original posters wanted, is to use an external multi-file
> text editor and search and replace blocks of code across a set of
> pages loaded into the editor (or found on disk). Unfortunately, even
> in 1.6, the search and replace function does not operate across
> multiple files.

There are decent open source multiple-file search/replace tools out
there, but I don't think of them as a substitute for a facility to have
these sort of automatically updating snippets. After all, while I might
want to replace all instances of a given chunk chucnk of a text when
used in the same way and the same place on the page, there is no
guarantee there will be an easy way to capture that in a search/replace,
even with regular expressions. For instance, I might have a contact
phone number in the footer of every page, and I want to change that, but
that doesn't mean I want that phone number changed everywhere on all
pages - maybe that original phone number is still valid in other contexts.

On the other hand, I also don't really consider it the job of
BlueGriffon to provide these sort of automatically-updating snippets.
As soon as one starts contemplating the desire for that, you're really
talking about about a content management system.

Marc

Reply all
Reply to author
Forward
0 new messages