This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi
Is there a way to change the included file that renders html in a component? I have created a Account plugin with a login component:
account components login default.htm (will contain login form html) loggedin.htm (will contain logout button)
Can I put something in the onRender() method to point to the loggedin.htm when the user is logged in?
Something like this pseudocode:
if(
thanks Ewen
Try again with markdown formatting...
account
components
login
default.htm (will contain login form html)
loggedin.htm (will contain logout button)
Can I put something in the onRender() method to point to the loggedin.htm when the user is logged in? Something like this pseudocode: if(logged_in) use loggedin.htm else use default.htm
Hi,
The only way to switch template file in when you call the component in CMS page or partial ?
I created a "template" option in my component settings that scan all files under the component template directory. I would like to be able to load the correct template file depending on the settings in my component, not by changing the way to call it. Is it possible ?
1-4 of 4