I am creating an admin section now. Should I go about this differently? I have gone through the learncfinaweek tutorials and copied the back end admin from that site and pasted it in for the new site. Is there more to connect than I am thinking to just paste in an admin section? I am thinking if I changed the adminPath to point to CoreBelief(the new site), it should have enough code to at least display the styling. It doesn't give an error, only no css displayed yet.
I can put the css and javascript up there if it will be helpful in finding the solution. I was thinking it might be in the Application.cfc.
Here is how far it gets with the Application.cfc file narrowed:
ColdFusion Server Developer | 11,0,07,296330 |
Template | /CoreBelief/admin/login.cfm |
Time Stamp | 25-Jan-16 03:32 PM |
Locale | English (US) |
User Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Remote IP | 0:0:0:0:0:0:0:1 |
Host Name | 0:0:0:0:0:0:0:1 |
red = over 250 ms average execution time
Application.cfc:
component {
this.name='CoreBelief';
this.datasource='CoreBelief';
this.applicationTimeout=CreateTimeSpan(10,0,0,0);
this.sessionManagement=true;
this.sessionTimeout=CreateTimeSpan(0,0,30,0);
/* this.ormEnabled=true;
this.ormSettings= {
logsql=true,
dbcreate="update",
cfclocation="com/entity"
};
this.invokeImplicitAccessor=true;
this.sessioncookie.httponly = true;
this.sessioncookie.timeout = "10";
this.sessioncookie.disableupdate = true;
function onApplicationStart() {
application.myName='David Carlisle';
application.myPosition='Freedom Fighter and Developer';
return true;
}
function onRequestStart(string targetPage) {
If(structKeyExists(url, 'reload')) {
onApplicationStart();
ormReload();
}
}
*/}
layout.cfm:
<cfparam name="attributes.section" default="" />
<cfparam name="url.message" default="" />
<cfif thisTag.executionMode eq "start">
<cfset adminPath = createObject('CoreBelief.admin.cfc.system').getBasePath(cgi.script_name)/>
<cfoutput>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>#attributes.section#: My Personal Website</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="#adminPath#/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="#adminPath#/assets/css/datepicker.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
}
</style>
<link href="#adminPath#/assets/css/bootstrap-responsive.min.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#adminPath#/index.cfm">My Website Admin</a>
<div class="nav-collapse collapse">
<p class="navbar-text pull-right">
<cfif structKeyExists(session,'emailaddress') && len(session.emailaddress)> Logged in as <a href="#adminPath#/logout.cfm" class="navbar-link">#session.emailAddress#</a></cfif>
</p>
<ul class="nav">
<li <cfif attributes.section eq "home">class="active"</cfif>><a href="#adminPath#/index.cfm">Home</a></li>
<li <cfif attributes.section eq "resume">class="active"</cfif>><a href="#adminPath#/content/resume/listworkexperience.cfm">Resume</a></li>
<li <cfif attributes.section eq "blog">class="active"</cfif>><a href="#adminPath#/content/blog/listblogpost.cfm">Blog</a></li>
<li <cfif attributes.section eq "portfolio">class="active"</cfif>><a href="#adminPath#/content/portfolio/listportfolio.cfm">Portfolio</a></li>
<li <cfif attributes.section eq "system">class="active"</cfif>><a href="#adminPath#/content/system/listadministrator.cfm">System</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<cfif len(trim(url.message))>
<div class="alert alert-success">
#url.message#
</div>
</cfif>
</cfoutput>
<cfelse>
</div><!--/row-->
</div><!--/.fluid-container-->
<cfoutput>
<script src="#adminPath#/assets/js/jquery-1.7.min.js"></script>
<script src="#adminPath#/assets/js/bootstrap.min.js"></script>
<script src="#adminPath#/assets/js/bootstrap-datepicker.js"></script>
<script src="#adminPath#/assets/js/custom.js"></script>
<script type="text/javascript" src="#adminPath#/../../ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="#adminPath#/../../ckeditor/adapters/jquery.js"></script>
</cfoutput>
</body>
</html>