SPIP Forums

[ar] [ca] [cpf] [de] [en] [es] [fa] [fr] [it]

This is where you can ask questions about the SPIP cms.

Topics : 195 Topics solved :  30

19 visitors now


Creating a New Template solved

by JulesJH - 15 April 2012 20:48 - Replies : 4

Hi,

I’m new to SPIP, and I think it’s great and I’m trying to put together my first site with it. However, the docs for setting up a new template in v2.18 are not easy to follow as they often refer to outdated versions.

Can someone tell me in fairly simple terms what I have to do to create a new template or use premade ones? I’m using a default setup with the default template which is I think, sommaire though it appears to link to other code.

What I need is a step by step. I’m sure others will find it useful too. So, I need something like: "add this line of code to here", substitute that code there", "put your .css template there".

I tried adding templates and skeletons from SPIP-Contrib, and sometimes they change the colours etc, but fonts, layout, lack of buttons etc is all wrong.

I perhaps wrongly assumed that a template would make a layout something like the images that the authors show, and a skeleton would automatically format my existing layout?


  • #1 > Creating a New Template ˆ
    by erational - 16 April 2012 11:40

    hello,

    a good way to start is to copy all the files located in /squelette-dist/ (skeleton by default) to a new folder /squelettes/ (skeleton that overrides the default skeleton) then to edit the files little by little.

    If you want to good ressource to learn the SPIP syntax, please have to look to http://programmer.spip.org/?lang=en


  • < #2 > Creating a New Template ˆ
    by JulesJH - 16 April 2012 13:31

    Hi erational,

    Many thanks for your reply. I will certainly look at the resource you recommended.

    A question though, if I put say, a modified template in /squelettes/, this will automatically override the default ones? I read that there was some linking to do, and that’s what confused me.

    If I use one of the pre-made one from Contribs, then that would go in the /squelettes/ folder and will automatically override the default ones?

    regards
    Jules


  • < #3 > Creating a New Template ˆ
    by erational - 17 April 2012 01:52

    if you put your templates in squelettes will automatically overrides the default telmplate located in squelette-dist.

    you have may choose another directory (for instance skeleton) but in this case, you have a create the file config/mes_options.php to tell spip where to find your template.

    some templates in contrib are a bit special because they are working as a plugin but you can also overrides them.

    i hope it helps


  • < #4 Creating a New Template ˆ
    19 April 2012 14:50

    Hi erational,

    Thanks again for your reply. I’m trying to use a pre-made template as a base. It is Sarka-SPIP Headlines-Blue. I installed it using the spip installer, and it shows up as an active plugin. However, even though it shows as an active plugin, it does absolutely nothing. I tried emptying caches etc, restarting my local server but nothing makes it work! Nothing shows! My theme is still the default sommaire. Any ideas what I should do?

    Thanks,
    Jules





Answering the question

« Creating a New Template »

  • (To create paragraphs, you simply leave blank lines.)

Keywords

You can tag this forum page with the keywords that you think are the most appropriate. This will help future visitors to find answers more quickly.


Installation, updates

Using the private area

Administration, management and configuration of your site

Creating your templates

Who are you?
  • [Sign In] [Register]

  • Submitting forum message without preview

    by Serge Markitanenko
    21 January 09:27

    Replies : 3

    This one helped me. 1. Copy forum.php to squelettes/formulaires 2. Comment in the file lines 303-318: // if (!count($erreurs) AND !_request('confirmer_previsu_forum')) // if (...)

  • creating a dropdown part of a page on a standalone page

    by drBouvierLeduc
    18 January 14:56

    Replies : 1

    Hi, Seems like the ’faq’ plugin does what you want : http://contrib.spip.net/Definitions-et-FAQ (the article is in french thought). Basically, you have 2 ways to do this : Inside any article : (...)

  • Template for tags

    by Serge Markitanenko
    3 January 11:45

    Solved - Replies : 4

    I have been translating to russian during one month. I’d spent 4 weekends for this ))) Check the newest version of composition for SPIP 2, maybe author support both branches for SPIP2 & (...)

  • Put Pagination around two loops

    by جورج قندلفت
    3 December 2012 10:00

    Replies : 3

    I suggest not to create a two columns layout. Instead of leftcol and rightcol, just one <div id="contenu"> spanning the area covered previously by leftcol and rightcol. And one (...)

  • Two Columns Article display with pagination

    by Serge Markitanenko
    19 November 2012 18:15

    Replies : 1

    I didn’t test the code, but you could try something like this. The main idea - to set special container for every element you put in code. <BOUCLE_list(ARTICLES) id_rubrique pagination 10 > (...)

  • Forms: Country drop down menu

    by erational
    6 October 2012 11:32

    Replies : 1

    of course, there are 2 plugins: Country list with countries and their iso code Geographie with countries and also french regions (but you can extend it) i recommand you to install the 1st (...)

  • SPIP export from Artisteer

    by wrmhle
    8 August 2012 11:14

    No reply

    Hello, Good news! Starting from 4.0, Artisteer supports Export Plug-ins. Can anybody create a plugin for SPIP and share it with our community? :) I think many users here are ready to pay some (...)

  • NO RESULT FOUND

    by erational
    23 May 2012 02:22

    Replies : 3

    Use the full syntax: <B_articlesT><ul> <BOUCLE_articlesT(ARTICLES){recherche} {par points}{inverse}> <li><a (...)

  • Creating a New Template

    19 April 2012 14:50

    Solved - Replies : 4

    Hi erational, Thanks again for your reply. I’m trying to use a pre-made template as a base. It is Sarka-SPIP Headlines-Blue. I installed it using the spip installer, and it shows up as an active (...)

  • How to list Sub Sub section when Sub section is activ?

    by erational
    7 March 2012 06:22

    Replies : 1

    hello i think there is 2 solutions solution 1: using recursive loop You build the full menu using a recursive loop and with jquery you fold / unfold whatever you want using the tag "on" (...)

  • Forum messages : 164
  • 53 6
  • Ask a new question

Sign In Register squelettes-dist/spip.png ٍShow the template of this page