Edit templates / settings

A forum for Bolt related questions / issues

Edit templates / settings

Postby gwbonline » Wed Oct 03, 2012 9:50 am

When I want to edit a template, I see this:

File '.yml' could not be saved: not valid YAML.
Files: /bolt/theme/default

Path: / bolt / theme / default


After this not a list of templates...

And when I want to edit the configuration, I have to edit some file. Are there no options like in PivotX?
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: Edit templates / settings

Postby hansfn » Wed Oct 03, 2012 11:38 am

Just for the record: I can confirm the problem with viewing/editing templates. (I didn't have time to report/look at it yet.)

Yes, currently all settings are in text files. There will be a GUI for the most common settings later - just like in PivotX.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Edit templates / settings

Postby Bob » Wed Oct 03, 2012 11:40 am

After this not a list of templates...


Let me guess, you've renamed the folder theme/default to another name, but you've not yet changed the name of the theme in app/config/config.yml:

theme: default


About your second question: Currently all configuration goes through the yaml files. My reasoning for this is: If you're comfortable editing HTML and CSS by hand, you probably won't have any problems editing a config file. Is this something that bothers you? Or is it just something you were wondering, because it's different?
Anyhow, this might change in the near future. If people find the yml files annoying, we will make 'settings screens', like we had in PivotX. :-)
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Edit templates / settings

Postby gwbonline » Wed Oct 03, 2012 12:21 pm

Let me guess, you've renamed the folder theme/default to another name, but you've not yet changed the name of the theme in app/config/config.yml:

theme: default


No, I did nothing...

About your second question: Currently all configuration goes through the yaml files. My reasoning for this is: If you're comfortable editing HTML and CSS by hand, you probably won't have any problems editing a config file. Is this something that bothers you? Or is it just something you were wondering, because it's different?
Anyhow, this might change in the near future. If people find the yml files annoying, we will make 'settings screens', like we had in PivotX.


I am indeed comfortable editing css and html files by hand, but I like being able to work with settings screens when it is related to the cms. It's easier, faster and a nice welcome after editing a lot of code. It also fits Bolt, as a 'simple' cms (for people without much knowledge about setting up website and want to setup a website).
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: Edit templates / settings

Postby Bob » Wed Oct 03, 2012 12:28 pm

gwbonline wrote:No, I did nothing...


I don't know then. Hans, you said you had the same.. Can you see what's going on?

I am indeed comfortable editing css and html files by hand, but I like being able to work with settings screens when it is related to the cms. It's easier, faster and a nice welcome after editing a lot of code. It also fits Bolt, as a 'simple' cms (for people without much knowledge about setting up website and want to setup a website).


Noted. :-)
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Edit templates / settings

Postby hansfn » Wed Oct 03, 2012 12:36 pm

OK, since you are listening, Bob, the problem is

Code: Select all
<li><a href="{{ path('files', { 'path': paths.theme }) }}"><i class="icon-hdd"></i>View / edit Templates</a></li>

in app/view/_header.twig

paths.theme is an URL which includes the absolute path. This works OK if you run Bolt from the web server document root, but not else ... Example:
Bolt installed at "example.org/~username/blog". The edit templates URL becomes "example.org/~username/blog/bolt/files//~username/blog/theme/default/"

My simple work-around for now is:

Code: Select all
<li><a href="{{ path('files', { 'path': 'theme' }) }}"><i class="icon-hdd"></i>View / edit Templates</a></li>
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Edit templates / settings

Postby Bob » Wed Oct 03, 2012 12:50 pm

Yes, this should work as a stopgap measure.

We'll need to fix the {{ paths }} array properly, though. It _should_ give the correct paths, even in setups with userdirs.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Edit templates / settings

Postby gwbonline » Wed Oct 03, 2012 12:56 pm

Thanks!
gwbonline
 
Posts: 580
Joined: Tue Jan 01, 2008 5:17 pm

Re: Edit templates / settings

Postby hansfn » Wed Oct 03, 2012 1:01 pm

We'll need to fix the {{ paths }} array properly, though. It _should_ give the correct paths, even in setups with userdirs.

Bob, this isn't related to UserDir, is it? It just looks uglier with UserDir (because of the tilde). Just remove the tilde from my example above, and it's still wrong (or at least a really ugly URL - repeating the base URL).

PS! paths.theme is correct - it's just the usage in the template that is wrong.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Edit templates / settings

Postby Bob » Wed Oct 03, 2012 1:18 pm

Ah, I suppose you're right. I'll fix it in the templates.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Next

Return to Bolt Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron