Hi,
I just started to work on blogs for users and installed "advanced blog". Is it possible to let them choose a style for their blog?
I could copy the whole theme, just changing the blog-tpl, so they could set the blog-layout by this (I think this I could achieve with the module "Blog-Theme", that would display the choosen user-content, like the blog, in the theme, the user chose in his configuration.). But this is a bit too complicated, I guess. Also I had to do all theme-changes 2,3,4,5,... times in the future (depending on provided blog-layouts).
Could I make another theme, placing in just a node-blog.tpl.php, which loads all other stuff from my standard-theme by putting (whatever) to the info-file or the template.php?
Of course I know, that blogs are just a content type, but does a module exist that makes it possible to do at least minor changes by the user (or even the the possibility to provide different layout, using css)?
If a user could choose from several css-files - would already be enough. I found modules, which provide the possibility for users to type in their own css.. but it´s a bit risky, isn´t it?
For now, I just want to provide a list of code, that people can copy to their Blog-Description-field, so at least the header of each blog (by putting the block "Blog Description" before the content) can look different with predefined layouts (putting some nice header pic in etc.)
But its far from optimal of course.
Or did someone wrote a module, which makes it possible to let users choose a tpl-file for the content type Blog? This could be another (and maybe better) solution. But I don´t know, if this is even possible.
thanks for any help,
Marc
Comments
Hm... brainstorming
Hm... brainstorming.
Perhaps you could add some fields to the blog content type which let the user select various pre-determined options (e.g. a select box or radio buttons).
Then in your template.php you could write some "template suggestion" code which takes into account the value set on a given node's field in determining which template file to load. So the code would ask "on the node being viewed, what value for this CCK field is set? If it's A then use this template suggestion, if it's B then use this template suggestion". See Working with template suggestions. You could do similar outside of nodes using user profile fields to set the preference instead if needed.
Hope this gives you some ideas. I don't have time to write the code for this right now, though maybe someone can springboard off this idea and write it. It's not very much code.
Thanks, I didn´t know of template suggestions yet
I hope, I will be able to do this.
I already thought of CCK-Fields at the profiles, but didn´t ever hear of template suggestions - I´ll try this tommorow at the moment, I don´t really understand it. So far, i´m mostly get to an success by trial and error, maybe also this time.
thanks again,
Marc