Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Boxberry bespoke packaging
A simple site I’ve just put together for a customer, powered by Textpattern:
Only plugin used is etz_striptags, which I pretty much always install on a site build.
Cheers,
Phil
Offline
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
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
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
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
Re: Boxberry bespoke packaging
Very interesting !
For Contact Form, you have not used zem_contact_reborn ? What have you used instead ?
Offline
Re: Boxberry bespoke packaging
@sacripant
I use a customised version of Machform for all my forms
Offline
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
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
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
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
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