I'm pretty new to CFWheels, and I guess the answer to this question may be pretty obvious, but please bear with me. I'm trying to include shared/loginregister
as a partial on my layout page. However, I keep getting this ColdFusion error:
Could not find the included template ../../views/home/shared/_loginregister.cfm. Even though i am using an absolute path.
My understanding was that all I had to do was place the partial _loginregister.cfm
in a shared folder that is in the root view folder as this image shows: Shared folder in views root. Then use the code #includePartial(partial="/shared/loginRegister")#
to access that page.
What I'm hoping to achieve is to be able to submit params to a global controller/ that can be shared by the different controllers as the login/register menu option is in the layout page and appears on every page. I'm also hoping to do this for my cart as well.
Here is a snippet of code from my controller. I've currently placed the controller code for this partial in the default Controller.cfc
file.
<cffunction name="newUser" access="remote" hint="connects to users database">
<cfset user = model("user").new() />
<cfdump var="user"><cfabort>
</cffunction>
Here is a snippet of code as it currently stands in my layout page code below:
<header>
<nav>
<div class="relative">
<div class="social_wrapper absolute">
<p>Join Us</p>
<a href="##"><span class="facebook sprite"></span></a>
<a href="##"><span class="twitter sprite"></span></a>
<a href="##"><span class="instagram sprite"></span></a>
</div>
<div class="auth_wrapper absolute">
<a href="##sign_in">Sign In</a> / <a href="##register">Register</a> <a href=""><span class="caddy sprite"></span> (0)</a>
#includePartial(partial="/shared/loginRegister")#
<div>
<input class="search_input" type="text" name="search" placeholder="I am searching for" value=""><!---
---><button class="search_icon search_btn" type="submit" name="search"></button>
</div>
</div>
</div>
</nav>
</header>
Any information on how to do this would be great.