0

I am using stash on a client site and was pushing over data from the entry itself for SEO meta, but want to provide the user the ability to customize it with the SEO Lite tab. Is there a way I can check for the SEO Lite custom entry specific values only? It seems that the default values are being checked against as well. Currently, I was trying to use the tag pair to do things like this:

{exp:seo_lite use_last_segment="yes"}
    {if title}
        <title>{title}</title>
    {if:else}
        <title>{exp:stash:seo_title strip_tags='yes' trim='yes'}</title>
    {/if}
    {if meta_description}
        <meta name="description" content="{meta_description}">
    {if:else}
        <meta name="description" content="{exp:stash:seo_desc strip_tags='yes' trim='yes'}">
    {/if}
    {if meta_keywords}
        <meta name="keywords" content="{meta_keywords}">
    {/if}
{/exp:seo_lite}

Does anyone know what I should be doing in order to accomplish this? Or if it's even available?

EE3, Stash 3.0.0, SEO Lite 1.5.1

  • You might want to specify more info - version of EE? Version of Stash? Etc. Off the top of my head, i'm betting the issue is with your {if} statements, because those run in a deeply weird order in many versions of EE. – adrienne Feb 29 '16 at 20:12
1

The only thing I can think of in your case is to specify some default in the description or keywords that you know and can check against. So, if SEO Lite defaults you'll know about it and can then use the ones from the entry.

The way I usually do this though is with extra tags, have you looked at those? http://wedoaddons.com/seo-lite/extra-tags

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.