We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Problems with LG Better Meta

Development and Programming

Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi

I have two problems I ran into with LG Better Meta. Anyone have any ideas?

1)

I found a very strange bug with Better Meta, so I am glad you stepped in.

When you access a weblog entry from the PAGES tab (if you add that to your main tabs) and click on the Better Meta tab inside the entry, the tabs disappear and the better meta content does not show up. If you click on EDIT and find the page you want to edit, it works fine.

If this isn’t clear, let me know.

2)

I’m also not having much luck overriding the defaults. I have the following block but it always displays the defaults from the extension settings, I even just tried the tag without parameters.

{exp:lg_better_meta
    entry_id="{embed:entry_id}"
    weblog_id="{embed:weblog_id}"
    url_title="{embed:url_title}"
    title="{embed:title}"
    description="{embed:description}"
    keywords="{embed:keywords}"
    author="{embed:author}"
    publisher="{embed:publisher}"
    rights="{embed:rights}"
    date_created="{embed:date_created}"
    date_modified="{embed:date_modified}"
    date_valid="{embed:date_valid}"
    identifier="{embed:identifier}"
    robots_index="{embed:robots_index}"
    robots_follow="{embed:robots_follow}"
    robots_archive="{embed:robots_archive}"
  }
       
Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi
For the #2, remove the weblog_id=”{embed:weblog_id}”, see if that helps. I have found a bug and reported it and it has been fixed. The next version of Better Meta (very soon to be released) will have that bug fixed.

I removed the weblog_id line and I still get the defaults. Why is doing unique meta for each page so difficult.

       
Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi
Are you sure you are passing the correct values? Example:
{embed="group/template" url_title="{segment_3}"}
It has worked on 12 different sites i operate, kinda weird that it is not working for you. May i see your entire template? (also the parent one)

.head template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  {exp:lg_better_meta
    entry_id="{embed:entry_id}"
    url_title="{embed:url_title}"
    title="{embed:title}"
    description="{embed:description}"
    keywords="{embed:keywords}"
    author="{embed:author}"
    publisher="{embed:publisher}"
    rights="{embed:rights}"
    date_created="{embed:date_created}"
    date_modified="{embed:date_modified}"
    date_valid="{embed:date_valid}"
    identifier="{embed:identifier}"
    robots_index="{embed:robots_index}"
    robots_follow="{embed:robots_follow}"
    robots_archive="{embed:robots_archive}"
  }

<link href="{stylesheet=stylesheets/mainmenu.css}" rel="stylesheet" type='text/css' />


<link href="{stylesheet=stylesheets/global.css}" rel="stylesheet" type="text/css" />

{if embed:homepage=="YES"}
  <link href="{stylesheet=stylesheets/home.css}" rel="stylesheet" type='text/css' />
  <link href="{stylesheet=stylesheets/ui.tabs.css}" rel="stylesheet" type="text/css" /> 
{/if}

<!--[if IE]><link href="{stylesheet=stylesheets/ie7.css}" rel="stylesheet" type="text/css" /><![endif]-->
<!--[if IE 6]><link href="{stylesheet=stylesheets/ie6.css}" rel="stylesheet" type="text/css" /><![endif]-->   




    $(function() {
    $('#tab-cntr').tabs({ fxFade: true, fxSpeed: 'fast' });
     });

</head>

subpage template using pages module:

{embed=embeds/.head}
       
Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi
subpage template using pages module:
{embed=embeds/.head}
Seems like that is your problem :D, you are not passing anything to the .head template. Do this:
{embed="embeds/.head" entry_id="{entry_id}"}
Make sure the {exp:weblog:entries} is above this. If it’s not then the embed tag will not know which entry_id it is (thus better meta will not know which entry either).

Is there a way to populate it without having to open a weblog:entries when using PAGES module?

       
Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi
subpage template using pages module:
{embed=embeds/.head}
Seems like that is your problem :D, you are not passing anything to the .head template. Do this:
{embed="embeds/.head" entry_id="{entry_id}"}
Make sure the {exp:weblog:entries} is above this. If it’s not then the embed tag will not know which entry_id it is (thus better meta will not know which entry either).

I changed my code to wrap it with a weblog:entries, and I still see the default options.

{exp:weblog:entries weblog="services" limit="1" sort="asc" disable="custom_fields|category_fields|categories|member_data|trackbacks|pagination"}
    {embed="embeds/.head" entry_id="{entry_id}"}
{/exp:weblog:entries}
       
Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi
Can you do this for me? In you .head template add this line.
<!-- The entry_id is: {embed:entry_id} -->
And go to the rendered page and see what it says.

I am just getting the same thing spit back in the page source. <!– The entry_id is: {embed:entry_id} –>

       
Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi
Are you sure you had?: {embed="embeds/.head" entry_id="{entry_id}”} If yes: Try this:
{embed="embeds/.head" entry_id="123"}
And see now how your renders. It should say: <!– The entry_id is: 123 –>

<!– The entry_id is: 123 –>

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

There is a new release that fixes your first issue and addresses the weblog id bug.

Check out the forum post

       
Saxi's avatar
Saxi
108 posts
17 years ago
Saxi's avatar Saxi

Works good, solved my problems.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham
Works good, solved my problems.

Excellent

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.