Page 1 of 1

Mix of dynamic and static content

Posted: Sat Oct 10, 2009 12:55 pm
by alltag
Hi, I'm new to Serendipity and couldn't find answers to my questions in the forums. I apologize in advance if they have been answered already.

1) I would like to mix static and dynamic content on my pages. As far as I can tell, I could either
a) Create a static page and add an dynamic entry plugin (well, does this even exist? I couldn't find it in the plugin repository.)
b) Or leave the page dynamic and add HTML nuggets. Is there a way to display different nuggets depending on the category or even better choose different ones during creation of new articles?

2) Is is possible to have different layouts and formatting rules per category? I would like to display author, date field only for some article types and leave those fields out for others.

3) I created a custom template directory based on the default template, yet it's not listed in the Manage Style view. Do I need to register it somewhere so that Serendipity knows that it exists in the Templates directory?

Much appreciated,

Eddy

Re: Mix of dynamic and static content

Posted: Sat Oct 10, 2009 1:54 pm
by garvinhicking
Hi!

Welcome to Serendipity! :-)

The best thing you should do is really to install the static page plugin and have a go at it. With that you can add your static content quite easily, and fit it into your blog. Depending on your programming skills, you can easily mix'n'mojo your Smarty/Custom Templates with the staticpage plugin, by utilizing the Smarty Markup event plugin.

As for nuggets, you'll probably want to install the serendipity_event_sidebarhider event plugin. This one allows you to granular control which sidebars are displayed in which blog categories, or if at all.

As for distinct templates per category, this one is handled by the serendipity_event_categorytemplates plugin, yes. However, if you only have minor changes, you'd probably simply want to edit your main entries.tpl template, and insert smarty {$if $category == 1} or whatever checks around certain elements.
3) I created a custom template directory based on the default template, yet it's not listed in the Manage Style view. Do I need to register it somewhere so that Serendipity knows that it exists in the Templates directory?
How did you create the template? You must create its own directory, and every template must have a unique info.txt file.

HTH,
Garvin

Re: Mix of dynamic and static content

Posted: Sat Oct 10, 2009 2:39 pm
by alltag
Thanks for answering 1) and 2)

I created a new template but copying the default template into the templates folder. The info.txt file is unique or at least it's modified. However, in the list of available templates I only see the ones fetched by Spartacus.

e

Re: Mix of dynamic and static content

Posted: Sat Oct 10, 2009 4:00 pm
by garvinhicking
Hi!

How is your template directory called? What is contained inside "info.txt" exactly?

Regards,
Garvin

Re: Mix of dynamic and static content

Posted: Sat Oct 10, 2009 5:01 pm
by alltag
Thanks Garvin, I've figured it out.

Best,

Eddy

Re: Mix of dynamic and static content

Posted: Sat Oct 10, 2009 5:13 pm
by garvinhicking
Hi!

Please document here what you did for other users that might have the same problem!

Thanks,
Garvin

Re: Mix of dynamic and static content

Posted: Sat Oct 10, 2009 7:04 pm
by alltag
I modified the info.txt file but forgot to change the name. One of those trivial problems that tend to eat up a lot of time...