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

Entry ID via Custom Field Type

Development and Programming

Joel Bower's avatar
Joel Bower
1 posts
14 years ago
Joel Bower's avatar Joel Bower

Hey guys,

Forgive me if im approaching this the wrong way, as i’m new to expression engine.

I’ve started developing a custom field type that allows you to add multiple media types to a single channel entry. The items are then saved in their own table linking back to the entry via it’s entry id.

I’ve come to the point where i’m trying to render the items, but don’t seem to have access to the entry id withing the replace_tag function.

Is it even possible to do this? Or should i come up with an alternate solution?

Cheers! Joel

       
Wes Baker's avatar
Wes Baker
343 posts
14 years ago
Wes Baker's avatar Wes Baker

When you say render, do you mean render them on the template? Because that’s what replace_tag does, it’s what’s called when you use that field’s field_name (e.g. {news_body}). When do you need access to the entry_id?

Wes

       
Joel Bower's avatar
Joel Bower
1 posts
14 years ago
Joel Bower's avatar Joel Bower

Yeah, in the replace_tag method.

I have a table that has a link back to a particular entry id and wanted to retrieve all the records in there that are relevant to the entry being displayed on a page.

       

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.