On Fri, 2 Oct 2009 16:32:32 +0800
"Traduction.BIZ" <[email protected]> wrote:

> Hi, I'm just starting to customise a Pootle installation, and I need
> to insert a meta tag in the front page content.
> 
> I'm using the code from SVN.
> 
> Could anyone be kind enough to give me a quick pointer in the right
> direction?

you'll need to know a bit about django templates
http://docs.djangoproject.com/en/dev/topics/templates/

if you want to add the meta tag to all pages then just edit
Pootle/templates/base.html this is the base template that provides the
basic structure for all pootle pages. and in it you'll find a <head>
section where you can add the meta tag

templates inside Pootle/local_apps/pootle_app/templates/ extend the
base template. but you'll notice that these templates don't have a full
html structure, they just implement "blocks" that are relevant to each
page. these blocks are defined in the base.html template.

one of these blocks is the extra_head block which can be used to add
stuff to the <head> section.

if you want to add the meta tag to just the front page then you need
to modify Pootle/local_apps/pootle_app/templates/index/index.html and
put something like this

{% block extra_head %}
 <meta name="keywords" content="fish" />
{% endblock extra_head %}

if you need a real example
Pootle/local_apps/pootle_app/templates/language/translatepage.html uses
this trick to load page specific javascript files.

cheers,
Alaa

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to