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

Using the weblog object

Development and Programming

Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

Developing a plugin and trying to leverage the weblog tag object to do most of the standard work.

// load weblog class
if ( ! class_exists('Weblog'))
{
    require PATH_MOD.'/weblog/mod.weblog'.EXT;
}
        
$mod_weblog = new Weblog();
$mod_weblog->limit = $limit ? $limit : 100;        
$mod_weblog->entries();

This works fine under normal circumstances, custom fields are replaced etc then my plugin does it’s job on it’s own tags. However once related entries (such as with Brandon Kelly’s Playa) come into play it seems that the weblog->entries() method overwrites the content of the object instead of appending to it.

$TMPL->tagdata is overwritten and becomes the tagdata for the related entry field tag pair. This doesn’t seem correct and breaks everything.

Does anyone have any suggestions to resolve this? If I need to post more code I can, however the workhorse is the ->entries() method on the weblog object.

Is there a better built in EE function call or object method that I can call to parse as the weblog tag would?

       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

Anyone? Bueller?

       
Jack McDade's avatar
Jack McDade
425 posts
about 16 years ago
Jack McDade's avatar Jack McDade

I’ve been wondering something similar…. anyone?

       
Fred Boyle's avatar
Fred Boyle
73 posts
about 16 years ago
Fred Boyle's avatar Fred Boyle

I’m still trying to figure it out. Nothing yet unfortunately.

       

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.