NamelessMC

Internet Explorer

Internet Explorer is not supported. Please upgrade to a more modern browser.

How to approach editing template HTML & CSS?
Started by theswiftriver

theswiftriver

theswiftriver

Member
Joined
27 Dec 2018
Last Seen
11 Sep 2019
Topics
1
Posts
1
I'm familiar with Bootstrap, Wordpress, and no stranger to PHP so I'm fine with getting my hands dirty. What I'm unsure about is how to approach editing templates and CSS in a maintainable way so when there are future updates to Nameless I'm not messing myself over.

How do you all approach customizing the look & feel of your projects?
theswiftriver · over 5 years ago · Last edited: over 5 years ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
16 Apr 2024
Topics
41
Posts
1046
Hi,

Firstly it's worth mentioning that version 2 (still in pre-release stages) is much more customisable than version 1 when it comes to the template/theme. In version 1, Bootstrap is a requirement and you can't modify everything anyway, however in v2 everything you see is customisable. If you do want to go with v2, the latest development code is here.

With Nameless v1, you'll want to copy an existing theme and template (in the styles/themes and styles/templates folder respectively), and start editing those.
v2 is a bit more involved, you can copy the default template in the custom/templates folder and start editing template.php in this folder to update the paths to your new template (a template's template.php stores the paths for CSS and JS includes for the template which will need updating).

Both v1 and v2 use the Smarty template engine for the template files, which lets you mix variables provided by Nameless with your HTML.

Hope that helps :)
x1
Samerton · over 5 years ago