Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-01-19 17:39:57

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Boxberry bespoke packaging

A simple site I’ve just put together for a customer, powered by Textpattern:

Boxberry

Only plugin used is etz_striptags, which I pretty much always install on a site build.

Cheers,
Phil

Offline

#2 2013-02-04 14:43:33

carlahearne
Member
From: Milton Keynes, UK
Registered: 2011-11-13
Posts: 29
Website

Re: Boxberry bespoke packaging

Another great Textpattern powered site by yourself; I love the colours and the simplicity of the site. It’s easy to navigate and the pictures look great.

Is the OpenGraph code generated by Textpattern depending on the page? Or did you hard code them per section?

Offline

#3 2013-02-04 14:52:29

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Boxberry bespoke packaging

Thanks @carlahearne!

The Open Graph is specific to the page, I used this form:

<txp:if_section name=",">
	<txp:variable name="page-title" value='<txp:site_slogan /> | Boxberry Ltd - Bespoke Packaging' />
<txp:else />
	<txp:if_article_list>
		<txp:variable name="page-title" value='<txp:section title="1" /> | Boxberry Ltd - Bespoke Packaging' />
	<txp:else />
		<txp:variable name="page-title" value='<txp:title no_widow="0" /> | Boxberry Ltd - Bespoke Packaging' />
	</txp:if_article_list>
</txp:if_section>

<meta property="og:title" content="<txp:variable name='page-title' />">
<meta property="og:type" content="article">
<meta property="og:url" content="<txp:if_individual_article><txp:permlink /><txp:else /><txp:if_section><txp:section url='1' /><txp:else />http://www.boxberry.co.uk/</txp:if_section></txp:if_individual_article>">
<meta property="og:image" content="<txp:if_individual_article><txp:if_article_image><txp:images limit='1'><txp:image_url/></txp:images><txp:else />http://www.boxberry.co.uk/img/style/site.png</txp:if_article_image><txp:else />http://www.boxberry.co.uk/img/style/site.png</txp:if_individual_article>">
<meta property="og:description" content="<txp:if_article_list><txp:article limit='1' status='sticky'><txp:etz_striptags><txp:excerpt/></txp:etz_striptags></txp:article><txp:else /><txp:article limit='1'><txp:etz_striptags><txp:excerpt/></txp:etz_striptags></txp:article></txp:if_article_list>">
<meta property="og:site_name" content="Boxberry Ltd - Bespoke Packaging">

Note that it uses etz_striptags in there. And that there is a fallback image URL (an image of their company logo) for if no article_image is specified for an article.

Offline

#4 2013-02-04 15:02:02

carlahearne
Member
From: Milton Keynes, UK
Registered: 2011-11-13
Posts: 29
Website

Re: Boxberry bespoke packaging

I think this is one of the main reasons I love Textpattern; if this was any other system I’m pretty sure no-one would have posted the code above; they’d have just written some useless comment about read the manual or something similar..

I’d still class myself as a bit of a beginner when it comes to Textpattern, so I’ve not used variables before but after looking at the code you posted I think I can just about get my head around what you’ve done; it’s given me some ideas about how I can solve some issues I’ve had in the past..

Thanks again Phil.

Offline

#5 2013-02-04 15:17:30

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Boxberry bespoke packaging

I also use that same variable to power my <title> tag like so:

<title><txp:variable name="page-title" /></title>

That gives much more control over meta page titles than simply using the <txp:page_title /> (I don’t like the way that tag always displays the site name before article name – it’s bad for SEO).

Offline

#6 2013-02-04 15:19:20

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

Re: Boxberry bespoke packaging

Very interesting !

For Contact Form, you have not used zem_contact_reborn ? What have you used instead ?

Offline

#7 2013-02-04 15:25:42

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Boxberry bespoke packaging

@sacripant

I use a customised version of Machform for all my forms

Offline

#8 2013-02-04 15:45:04

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Boxberry bespoke packaging

Hi Phil, indeed a beautiful site.

I use a customised version of Machform for all my forms

What’s the advantage over zcr? – especially for a simple form which is what you seem to be using.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2013-02-04 16:04:55

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Boxberry bespoke packaging

Because I don’t always use simple forms.

There’s probably no advantage over zcr in terms of this specific site, but I use the same Machform software on all sites so if a client suddenly wants a multi-page form, payment system, questionnaire etc. then I can create one in a matter of minutes.

It also means I’m not relying on a particular Textpattern plugin. And it’s fully portable to any other CMS if I ever decide to move.

Offline

#10 2013-02-04 16:29:53

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Boxberry bespoke packaging

makes sense.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2013-02-05 02:34:39

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Boxberry bespoke packaging

Phil, thanks for the info on this site. The way you have constructed the URL titles is very interesting (worthy of a TXP Tip in case you’d like to submit one for the community). For the contact forms, I remember Machform from a few years back but had forgotten about it. What, if any, advantages do you find with Machform over say Wufoo?

Offline

#12 2013-02-05 06:24:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Boxberry bespoke packaging

I’d also like a tip on how the cookies warning was inserted as I can not see it in the source code :)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB