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

Can I use a channel entries tag on a template with a channel entries form tag on it?

How Do I?

From EE Slack's avatar
From EE Slack
185 posts
about 2 years ago
From EE Slack's avatar From EE Slack

Does anyone know if you’re using a Channel Form to edit an entry for a particular channel, but need to access data from the entry itself, does it lock out any channel:entries use?

In my situation, the entry is being edited with a Channel Form with a file field included. But when in the edit screen, you can’t actually download an existing file, only remove it. I’m trying to add a button to download the currently uploaded file.

I’ve tried embedding a template and using a template partial outside of the channel:form tag and setting a PHP variable, but nothing I try will run the channel:entries tag when a channel:form tag is present. I can do a basic channel:entries with a different channel and it runs without any issues. With the way EE handles file paths, I’m trying to avoid pinging the database directly. Thanks in advance for any insight!

       
From EE Slack's avatar
From EE Slack
185 posts
about 2 years ago
From EE Slack's avatar From EE Slack

Group effort answer- yes, there’s nothing about having a channel entry form on a page that would interfere with a channel entry tag. In this case, the main problem was the status on the entry in question was something other than the default ‘open’ so the channel entry tag wasn’t returning anything.

Going with an embed, passing it the entry id, and using that in a channel entry tag works fine- as long as the tag would work fine otherwise based on the url and parameters.

       
teddonkey's avatar
teddonkey
1 posts
one year ago
teddonkey's avatar teddonkey

It seems like you’re dealing with a tricky situation. One approach to overcome this is to use AJAX to fetch the necessary data without interfering with the Channel Form. This way, you can dynamically load the information you need for your download button. If you need help implementing this, let me know, and I can guide you through the process.

       

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.