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

LG Better Meta 1.7.x - Now with sitemap meta and generator! - Official Support Thread

Development and Programming

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

I have just released LG Better Meta 1.7.0 which includes some significant changes including:

    - Added [url=http://leevigraham.com/cms-customisation/expressionengine/lg-better-meta/#setting-sitemap-meta-defaults]sitemap meta data[/url] for pages and entries

    - Added sitemap generator template tag

    - Replaced {exp:lg_better_meta} with [url=http://leevigraham.com/cms-customisation/expressionengine/lg-better-meta/#tag-lg-better-meta-template]{exp:lg_better_meta_pi:template}[/url]

    - Added [url=http://leevigraham.com/cms-customisation/expressionengine/lg-better-meta/#tag-lg-better-meta-entries]{exp:lg_better_meta_pi:entries}[/url] to loop over existing meta entries.

    - Fixed MSM compatibility for masked control panels

    - Rewrote the plugin for greater speed and efficiency

Check out the screenshots an documentation on my site.

Because of these changes I thought it best to create a new support forum thread.

Fire away with any feedback or questions.

Update 1.7.1

  • Fix for curly quotes encoding issue.
  • Improved tab styling
  • Support for quick saves, previews and revisions.
       
Mike Young's avatar
Mike Young
283 posts
16 years ago
Mike Young's avatar Mike Young

So does this actually generate a sitemap or just meta for a pre-existing sitemap?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham
So does this actually generate a sitemap or just meta for a pre-existing sitemap?

The extension provides a way to set default weblog sitemap meta such as change frequency and priority. You can then explictly set the meta data on a per entry basis in the publish / edit form.

Once the meta has been set the included plugin provides a template tag that outputs the data. Example:

<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9"
    url="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
    >
    {exp:lg_better_meta:entries
        weblog="blog"
        disable="categories|custom_fields|category_fields|customer_fields|member_data|pagination|trackbacks"
        dynamic="off"
        rdf="off"
        status="not closed"
    }
    <url>
        <loc>http://test.com/blog/post/{entry_id}/{url_title}/</loc>
        <lastmod>{edit_date format="%Y-%m-%d"}</lastmod>
        <changefreq>{change_frequency}</changefreq>
        {priority}</priority>
    </url>
    {/exp:lg_better_meta:entries}
</urlset>
       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

I had previously built a “sitemap” like this using categories - and custom category fields to hold change_frequency, priority, etc, but this is a much better way to take care of that. Haven’t got to make use of the sitemap tags yet, but thanks for the example.

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

No worries Ryan… Theres plenty of examples in the docs 😊

       
Andy Harris's avatar
Andy Harris
958 posts
16 years ago
Andy Harris's avatar Andy Harris

OK, I installed v1.7 and when I try to run this:

{exp:lg_better_meta_pi:template entry_id="{embed:entry_id}"}

I get this:

Error Number: 1054

Description: Unknown column 'exp_lg_better_meta.include_in_sitemap' in 'field list'

If I run {exp:lg_better_meta_pi:template}, I don’t get an error but obviously I don’t get my site title either!

       
Andy Harris's avatar
Andy Harris
958 posts
16 years ago
Andy Harris's avatar Andy Harris

Odd. The problem appears to be that the exp_lg_better_meta table didn’t get the additional three fields when I installed. I added them manually and we seem to be working now.

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

Ah I see what could have gone wrong. Did you have a previous version of LG Better Meta installed? The install scripts checks to see if the table exists before trying to create a new one.

If you did a straight upgrade it would have added the new cols.

Before you say anything, I’m making the required changes to the docs 😉

Cheers

       
Andy Harris's avatar
Andy Harris
958 posts
16 years ago
Andy Harris's avatar Andy Harris

Yeah, I had one there previously so that must be it.

       
Andy Harris's avatar
Andy Harris
958 posts
16 years ago
Andy Harris's avatar Andy Harris

Have you managed/tried to get an LG generated sitemap accepted by Google Webmaster Tools yet?

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

Whats the warnings you are getting?

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

Hey Andy,

The example in my docs followed the sitemaps.org validation example. I have updated the docs to reflect the basic sitemap.org example which works fine with Google.

Cheers

       
Andy Harris's avatar
Andy Harris
958 posts
16 years ago
Andy Harris's avatar Andy Harris

D’oh, sorry Leevi that was obvious! I have loads of sitemaps live, why I didn’t think to set it the same I can’t tell you.

Works fine now, unsurprisingly - cheers.

       
anoopbal's avatar
anoopbal
147 posts
16 years ago
anoopbal's avatar anoopbal

I just purchased LG Better and I just cannot get it to work. I downloaded it, and changed the settings and submitted it. This is what I got :

Notice: Undefined index: sitemap_defaults_ in /home/anoopbal/public_html/cos/extensions/ext.lg_better_meta.php on line 754

Warning: Invalid argument supplied for foreach() in /home/anoopbal/public_html/cos/extensions/ext.lg_better_meta.php on line 754

Notice: Undefined index: weblogs_ in /home/anoopbal/public_html/cos/extensions/ext.lg_better_meta.php on line 759

Warning: Invalid argument supplied for foreach() in /home/anoopbal/public_html/cos/extensions/ext.lg_better_meta.php on line 759

Warning: Cannot modify header information - headers already sent by (output started at /home/anoopbal/public_html/cos/extensions/ext.lg_better_meta.php:754) in /home/anoopbal/public_html/cos/core/core.functions.php on line 296

I know I am doing something fundamentaly wrong. I tried inserting the tag in the template but not sure if it’s the right one or even where the tag goes. I cannot really understand the documentaion. Thanks

       
anoopbal's avatar
anoopbal
147 posts
16 years ago
anoopbal's avatar anoopbal

I figured it out. I removed the “hyphens” and it submitted.

Now how do I get the article title to show up? I copy pasted the tag {exp:lg_better_meta_pi:template entry_id="{segment_3}”} on the template where my blog articles are stored. But it doesnt change anything.

       
1 2 3 Last

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.