how to reference variables from ini ?

18 views
Skip to first unread message

infominer

unread,
Jan 30, 2021, 1:48:21 AM1/30/21
to wwwmake
Quick question.

I've been hard-coding some things in my templates, but realizing I should just make some variables in the ini.

I'm just not sure how to call it.

I see feed.title, and feed.url


would it be  planetid.title , planetid.variable and so forth ?

Thanks

infominer

unread,
Jan 30, 2021, 3:45:15 AM1/30/21
to wwwmake
nevermind... figured out I just needed to call site.title, like so:

<%= site.title %>

This will be much better!

Gerald Bauer

unread,
Jan 31, 2021, 12:58:26 PM1/31/21
to www...@googlegroups.com
Hello,

> how to reference variables from ini?

Yeah, I know - sorry - adding "custom" variables / settings in the
ini and than reference it in the template is a missing feature.
I am all for it - as always I hope to find some time later this
year to work on some missing features.

For now only "hard-coded" known variables / settings are supported
(and they must have a 1:1 mapping in the database schema).
Not sure if this helps.

Cheers. Prosit 2021!

infominer

unread,
Jan 31, 2021, 8:18:42 PM1/31/21
to wwwmake
not sure. I did try putting some variables but pluto tried to read them as a site.. I guess that's what you mean by having a 1:1 mapping in the schema...

right now I have a copy of the template for each page, was thinking I could create variables for common settings, and so use the same template.

mostly I'm just glad to figure out that ordering of youtube videos.

Eventually I may try digging into the pluto code, myself :)

Gerald Bauer

unread,
Feb 1, 2021, 3:41:50 AM2/1/21
to www...@googlegroups.com
Hello,
sorry for the confusion. See
<https://github.com/feedreader/pluto/blob/master/pluto-models/lib/pluto/models/site.rb#L55>

All I am trying to say only this 5 predefined props / settings will work:
- title / name
- author / owner
- email
- source / url
- key / slug

Cheers. Prost.
Reply all
Reply to author
Forward
0 new messages