Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

replace metadata in site publisher's templates

Discussion in 'User Experience' started by Masiar, Sep 11, 2017.

  1. Masiar

    Masiar Registered

    Joined:
    Sep 10, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lodz, Poland
    cPanel Access Level:
    Root Administrator
    Hello,

    it is my first post on cpanel's forum so i want to say hello to all cpanel's community :)

    I work on the translations site publisher themes by edit meta.json and index.html.tt files in
    Code:
    /usr/local/cpanel/etc/site_templates/
    Last night I do cPanel updates, what in resulted overwriting of these files in all default templates.

    Is there any way to protect translated files against overwriting by updating in the future?

    Kind regards
     
  2. sysdop

    sysdop Member

    Joined:
    Sep 10, 2017
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    International
    cPanel Access Level:
    Root Administrator
    @Masiar You can lock the folder with the chattr +i -R /usr/local/cpanel/etc/site_templates/ command, but it is not a recommended practice, ideally you should contact the cPanel team via a ticket, not find a solution as this is the only option I see possible first of all.
     
  3. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    197
    Likes Received:
    17
    Trophy Points:
    93
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    @Masiar - Currently there isn't a mechanism to translate strings in Site Publisher. You can, however, copy the contents of /usr/local/cpanel/etc/site_templates into /var/cpanel/customizations/site_templates/ and make any updates you want there. Your customers will see both english (from the cpanel-provided versions) AND your translated templates when they open the site publisher interface.

    Contents of /var/cpanel/customizations/site_templates/ will be totally ignored during any update process, so you won't have to freeze any folders or write upcp hooks or anything.
     
  4. Masiar

    Masiar Registered

    Joined:
    Sep 10, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Lodz, Poland
    cPanel Access Level:
    Root Administrator
    @sysdop @cPanelAdamF many thank for reply!
    @cPanelAdamF are you planning to implement mechanism to translate strings in Site Publisher?? That would be very helpful. Duplicating templates is not the best in my opinion :/
     
  5. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    197
    Likes Received:
    17
    Trophy Points:
    93
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    yeah, I agree, it's not the greatest solution in the world.

    As far as the future of Site Publisher goes, the only conversations we've had internally about it is to potentially iterate on it in the direction of one of the off-the-shelf static-site-generators. Like jekyll or Grav - A Modern Flat-File CMS | Grav in order to open up tons more templates and participate in those communities. There's some really great sites out there built using static-site generation and Site Publisher was an experiment to see how much interest our end-users would have in those.

    Internally we typically do a big strategy conversation after the new year so I may have more news then.
     
    Masiar likes this.
Loading...

Share This Page