I'm pretty new to CFWheels and I guess the answer to this question may be pretty obvious but please bare with me. I'm trying to include shared/loginregister as a partial on my layout page but 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 the image shows in the attachment.
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/ a controller that can be shared amongst the different controllers as the login/register menu option is in the layout page and appears on every page, i'll also be 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 greatful
I'm pretty new to CFWheels and I guess the answer to this question may be pretty obvious but please bare with me. I'm trying to include shared/loginregister as a partial on my layout page but 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.
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/ a controller that can be shared amongst the different controllers as the login/register menu option is in the layout page and appears on every page, i'll also be 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>
--
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/d/optout.