ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to show the weblog name at the top of my template?

June 22, 2007 3:27pm

Subscribe [3]
  • #1 / Jun 22, 2007 3:27pm

    humain

    2 posts

    Hi, I’m just trying to show the name of the weblog at the top of the template.  Should be easy enough, right?

    I have 7 weblogs and they all use the same template for their articles.  Do I use conditional variables for this?

    The code I have in is:

    {exp:weblog:weblog_name weblog="business_strategies"}

    Obviously though it just prints out that one weblog name.  How do I make it print out whatever weblog name the entry is contained in?

    thanks

  • #2 / Jun 22, 2007 3:37pm

    Jeremy Latham

    74 posts

    I’m new too - wouldn’t you just use {blog_title}.

    More info in the User Guide.

  • #3 / Jun 22, 2007 3:42pm

    humain

    2 posts

    No, because you still have to define which weblog to call the blog title from.

    This seems like a really basic function that shouldn’t be hard to do, yet I can’t find an answer anywhere.

  • #4 / Jun 22, 2007 4:08pm

    mrtdueck

    5 posts

    The following code is found in the default template for the index to display the weblog name in a header:

    {exp:weblog:info weblog="{my_weblog}”}{blog_title}{/exp:weblog:info}

    where the name of the weblog is “my_weblog”

  • #5 / Jun 22, 2007 4:13pm

    humain

    2 posts

    Thanks for the help so far, but those examples are still examples of hardcoding the weblog name into the template.  I have multiple blogs accessing the same template so I need the weblog name to be dynamically populated or done using conditionals.

    Expression engine seems to have a serious learning curve.  I can’t even get something so basic and useful to work.  Or maybe I’m just dense.

  • #6 / Jun 22, 2007 4:48pm

    mrtdueck

    5 posts

    I’m just getting started on all this too, and it can be frustrating. I think the power of the engine though will make it worth it once you have conquered all the mountains, so to speak.

    If you already have a number of weblogs, one suggestion might be to create a separate template group for each weblog, using the main template group you use now as the basis for copying templates into each new group. Then you can hardcode the name of the weblog into the templates in that group for that weblog.

    If you create new weblogs and use the copy template group feature, updating of the templates with the name of the weblog is automatic.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases