0
Welcome Guest! Login
0 items Join Now

Creat a custom template for specific page

    • Yaamby's Avatar
    • Yaamby
    • Rocketeer
    • Posts: 60
    • Thanks: 0

    Creat a custom template for specific page

    Posted 11 years 7 months ago
    • Good morning,

      I would like to put a specific body code for a specific page of a website,

      Is it possible with custom.css method ?

      the css is :
      body {
      background: #310404 url(../images/red_texture.jpg) repeat top left;
      font-family: 'BebasNeueRegular';
      }

      Thank you for you answer !
    • Last Edit: 11 years 7 months ago by Yaamby.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • yes that should be possible.

      1. create a custom css file gantry-custom.css in the css folder of your template and add a code like

      html body.my-custom-bg {
      background: #310404 url(../images/red_texture.jpg) repeat top left;
      font-family: 'BebasNeueRegular';
      }

      2. enable the page-suffix feature in gantry

      3. use a page class for that menu-item like " my-custom-bg"
      You can set this in the page display options of the menu-item
    • The following users have thanked you: Christina Parker

    • Yaamby's Avatar
    • Yaamby
    • Rocketeer
    • Posts: 60
    • Thanks: 0

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • It perferctly works !!

      Thank you for this new tip!!

      I will add on my tips book right now haha !!

      Thanks
    • Yaamby's Avatar
    • Yaamby
    • Rocketeer
    • Posts: 60
    • Thanks: 0

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • Elsewhere,

      the BTF (Big Tutorial Forum)] which group all the main tips about RT templates is for when ? :P

      It could sincerely help !!!


      Just a last question,

      if I want put all the css file in specifc page and not only the body code

      I have to add the html X.custom-bg each time ?
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • hmmm
      I don't really understand that question.
      Can you explain a little more?
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • hmm If understand your question right.
      Other rules for that page could look like

      .my-custom-bg p {color: red !important;} just to give an example ...
    • Yaamby's Avatar
    • Yaamby
    • Rocketeer
    • Posts: 60
    • Thanks: 0

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • Quite simply, is it possible to creat

      template-custompage1.css

      template-custompage2.css

      To apply the whole css file for specific page.


      I am wondering that because I have a lot of css files that I put in my index.php of the template

      with
      <link rel="stylesheet" type="text/css" href="css/demo.css" />

      to connect with js files but it's an another thing.

      but I am afraid there are some conflicts with all this css.

      For example I have a area problem that i put here : http://www.rockettheme.com/forum/index.php?f=809&t=208873&rb_v=viewtopic

      I don't know which css override which... (I don't know if you understand me ^^ It's pretty complicated in more than my english :oops: )

      Thank you for you answers !! I sended by PM the ident and password, if you want take a look of the code on the page :
      www.ventedirectevdi.fr/index.php/nu-skin-nuskin/test2
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • I wouldn't do it that way ... why dont you just use the page class as suggested?
      Loading multiple JS files isn't really a solution.
      For the other page ... I'm not site I have no clue what you are trying to do.
    • Yaamby's Avatar
    • Yaamby
    • Rocketeer
    • Posts: 60
    • Thanks: 0

    Re: Creat a custom template for specific page

    Posted 11 years 7 months ago
    • Ok Ok

      I will do as you said thank you henning !!! very much

Time to create page: 0.060 seconds