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.

Photo Gallery: Category name in <title> dynamically?

January 25, 2011 3:14pm

Subscribe [2]
  • #1 / Jan 25, 2011 3:14pm

    Krake

    72 posts

    Hi there

    I’d like to use the name and description of the current gallery category in my meta tags.

    Am using low_seg2cat for that on regular weblog entries but the plugin doesn’t seem to work with the gallery module.

    Any ideas on how to do this dynamically? (other than {if segment_3=="C4"}Frogs{/if} {if segment_3=="C5"}Cats{/if} etc.)

    Thanks!
    K

  • #2 / Jan 26, 2011 4:01am

    John Henry Donovan

    12339 posts

    Krake

    You could do something like the following. Would that work for you?

    {exp:gallery:entries gallery="{gallery_name}" limit="1"}
    <title>{category}</title>
    <meta name='description' content='{category_description}' />  
     {/exp:gallery:entries}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases