Hi,
wouldn't it be nice, if there would be a optional parameter for the sitemap tag, which tells the tag to look after a meta description for the content. if there is a desciption: print it right below the title of the menupoint. i think this would be a benefit for many sitemaps. what do you think?
regards
anti
advanced sitemap
Re: advanced sitemap
Hi Antiheld2000,
you could try out the content_dump plug-in. Sorting by hierarchy will allow you to list the pages in the correct order and you can access specific content blocks (e.g. an additional block called description). However, you can not use it to access the meta-data at the moment.
Alternatively, I guess with the CGSimple module (I think that was its name), you could also achieve something like you want.
I think the hardest part is to parse the meta-data and check for a description and use that (I do not know if if the CGSimple can do that).
Since I am a lazy guy, I use a content-block called "meta-description" on my page-templates and use that field in the template in the head-area. That way, the meta description is stored as a content-prop and I could use it easier. Don't know if that would be a solution for you.
I think the sitemap as described would be a great feature. I might consider to implement it in a new version of the content_dump plug-in (meta-data parsing)... but it would take a little time...
Best
Nils
you could try out the content_dump plug-in. Sorting by hierarchy will allow you to list the pages in the correct order and you can access specific content blocks (e.g. an additional block called description). However, you can not use it to access the meta-data at the moment.
Alternatively, I guess with the CGSimple module (I think that was its name), you could also achieve something like you want.
I think the hardest part is to parse the meta-data and check for a description and use that (I do not know if if the CGSimple can do that).
Since I am a lazy guy, I use a content-block called "meta-description" on my page-templates and use that field in the template in the head-area. That way, the meta description is stored as a content-prop and I could use it easier. Don't know if that would be a solution for you.
I think the sitemap as described would be a great feature. I might consider to implement it in a new version of the content_dump plug-in (meta-data parsing)... but it would take a little time...
Best
Nils
- antiheld2000
- Forum Members
- Posts: 236
- Joined: Thu Jan 31, 2008 9:23 am
Re: advanced sitemap
thanks for your answer. i would like to see this as a optional feature in the future. i tried it myself with some code snippets from php.net, but it doesn't work properly. i don't know if this is the right forum and wether the interest for this is big enough but i post my tryings:
i'm getting the meta-data in pluginsfunction.sitemap.php right behind line number 179 with this code (works great):
right behind that i try to figure out the essential data i want with this code:
and parse it to the $menu variable to print it out:
but unfortunately it doesn't work right. i think the regular expression is'nt correctly working. does anybody see the fault?
i'm getting the meta-data in pluginsfunction.sitemap.php right behind line number 179 with this code (works great):
Code: Select all
$html = my_htmlentities($onecontent->Metadata());
Code: Select all
preg_match_all("|<meta[^>]+name=\"([^\"]*)\"[^>]+content=\"([^\"]*)\"[^>]+>|i",$html,$out,PREG_PATTERN_ORDER);
for ($i=0;$i < count($out[1]);$i++) {
if (strtolower($out[1][$i]) == "description") $meta['description'] = $out[2][$i];
}
Code: Select all
$menu .= '<br />' . my_htmlentities($onecontent->Metadata()) . '<br />';
Re: advanced sitemap
Use {description}?
- antiheld2000
- Forum Members
- Posts: 236
- Joined: Thu Jan 31, 2008 9:23 am
Re: advanced sitemap
in the sitemap plugin?Russ wrote: Use {description}?
Re: advanced sitemap
Apologies antiheld2000, I should have had a coffee and woken up before posting !