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

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

Topics : 255 Topics solved :  30 %

70 visitors now


Home > Forums about SPIP >  Creating your templates > Creating a New Template

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 »

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?
  • Log in Register

  • access vignette images from a sub domain

    by djallas
    26 July 17:21

    No reply

    how can a subdomain spip site(sub.domian.com) access vignette images from the spip site installed in the root (domian.com) NB: they use a common database

  • How to display table content in SPIP?

    by erational
    4 January 18:46

    Solved - Replies : 3

    the shortcut is |name|first name|job| |UMUGWANEZA |Dalia| Assistant Lecturer| |UWASE| Rosine| Assistant Lecturer| returns name first name job UMUGWANEZA Dalia Assistant Lecturer UWASE (...)

  • serious error

    by b_b
    4 January 18:25

    Replies : 6

    Nice, and a third post now... http://forum.spip.net/en_266168.html ↑ deleting this one too, i’m thinking to mark you as a spammer next time :)

  • dynamic tags

    by Jatropha Multifida
    12 December 2016 12:03

    Replies : 1

    You may refer to the section "Extending SPIP" for examples and steps on how to create your dynamic tags: http://programmer.spip.net/Declaring-new-functions

  • set upload _MAX_SIZE_ for LOGO_ARTICLE

    by djallas
    12 December 2016 07:18

    Solved - Replies : 2

    Thank you, solved!

  • CVT form posting articles

    by magahugu
    21 January 2016 22:40

    No reply

    Hello dear Community, I want to make a form allowing users to submit content. I’ve followed the CVT guide before for creating user signups, and now I’m looking for a similar function to allow for (...)

  • Low Quality with image processing using Filter image_masque

    by tcharlss
    6 October 2015 11:36

    Replies : 1

    Hi, You can control the quality with the constant _IMG_GD_QUALITE (the article is in french). Add this line in your configuration file config/mes_options.php : define('_IMG_GD_QUALITE', 85); (...)

  • How to make SPIP 2.0 template responsive without upgrading

    by Boaz
    11 September 2015 14:34

    Solved - Replies : 3

    Thanks a lot !

  • #GET or PHP in Loops Criteria / Boucle criteres

    by brain_damage
    27 June 2015 19:37

    Replies : 3

    Ok, spip haven’t got limitations, but you must know what is the good practices to write templates and where you can use php. You must not use php in .html template. but you can use php (...)

  • where is my homepage article? what is the article Number?

    by BigDave
    1 May 2015 14:07

    No reply

    i am trying to locate the article Number for what was previously display on my homepage - some articles were deleted after a hack and my homepage is blank. I can’t find a sommaire file to see how (...)

  • Forum posts : 236
  • 80 23 %
  • Ask a new question