The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Theming Paper Lantern

Discussion in 'User Experience' started by imcjd, May 26, 2016.

  1. imcjd

    imcjd Member

    Joined:
    Apr 12, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi,

    I'm trying to work out how to theme the Paper Lantern theme (I'm assuming it would be stupid to theme X3 as that is/going to be deprecated).

    Anyway I am not sure of the approach to take:

    * Should I clone the theme and start from scratch - we want to make some fairly significant changes. If so, are there are any up-to-date guides for this?
    * Should I just create a "style" as per this link - I'm not sure this is going to be very flexible if you can only edit CSS? We need to edit HTML (headers and footers mainly) too.

    Please can anyone help advise?
    Cheers.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. imcjd

    imcjd Member

    Joined:
    Apr 12, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks, that's really useful, maybe it should be referenced in the official docs.

    I do have some questions after reading this:

    * Will creating a style in 'var/cpanel/reseller/' create it for all our reseller accounts? We only want it to apply to a test account for now.
    * Don't seem to have the change style option - "Change your style to your own custom style (User Profile > change style)" in Paper Lantern, might be because I haven't actually created a custom style yet.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The docs are linked there in the related blog post mentioned in that thread.

    When you create Packages, you need to add a Feature list to it. In that Feature list is an option you can enable or not for changing style.
     
  5. imcjd

    imcjd Member

    Joined:
    Apr 12, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi Infopro,

    Do you know how cPanel hides the sidebar in the retro theme (for paper lantern)? The entire HTML section is not even present in the source and I cannot work out how it's been done. I looked at the retro theme source files in /usr/local/cpanel/base/frontend/paper_lantern/styled/retro but didn't get any clues.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,446
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hides? Not sure what you mean, its not hidden. It can be collapsed when you click Collapse Stats link at bottom of it.

    TBH, and someone smarter than me will hopefully correct my mistake here, but I don't think you should spend much time with the retro style. Paper Lantern is the new default.
     
  7. imcjd

    imcjd Member

    Joined:
    Apr 12, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Sorry I mean the retro style based on the Paper Lantern theme. It just seems to a styles.css file mainly so not sure how they managed to completely remove the #sidebar. It's like it is running extra javascript somewhere or something.
     
  8. imcjd

    imcjd Member

    Joined:
    Apr 12, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    For anyone else wondering I worked it out, /usr/local/cpanel/base/frontend/paper_lantern/index.auto.tmpl includes the following:

    Code:
    [%- IF CPANEL.current_style == 'retro' -%]
        [% INCLUDE home/index_retro.tt %]
    [% ELSE %]
        [%- INCLUDE home/index.tt -%]
    [% END %]
    This loads a different template for the retro style. This is exactly what I want to do but don't think I should edit this file so back to the drawing board.
     
Loading...

Share This Page