Jump to content

LoginRegister js and css


Orodreth
 Share

Recommended Posts

I have Processwire 3.0.98 and LoginRegister module, and I am setting up the site functionality before making it pretty. So my site is installed with default PW theme/profile (no custom js or css yet). It looks like it is using the UIKit Admin theme on the admin side.

The HTML output the user sees (client side / front end) for the Login, Register, Edit Profile pages looks like it could use the UiKit and JQuery css and javascript that is used on the admin side.

Is there a way to include all of the JQuery and UiKit css and js to the /site/ front end?

Link to comment
Share on other sites

Welcome to the forums @Orodreth,

1 hour ago, Orodreth said:

Is there a way to include all of the JQuery and UiKit css and js to the /site/ front end?

In the long run, you are better off including the resources you need in the frontend either from a CDN or ones you've downloaded locally (to you /site/templates/ folder, for instance. For example, in the case of jQuery, the current version used in ProcessWire core is 1.11.1. The file is named jquery-1.11.1.js. If ProcessWire moves to a later version of jQuery in the future, your code will break since the name of that file will change. 

To get jQuery from a CDN ,go here or here, for instance. For UI Kit, that's here.

However, if you still wish to use the ones that ship with ProcessWire:

$config->urls->JqueryCore;// /wire/modules/Jquery/JqueryCore/
$config->urls->AdminThemeUikit;// /wire/modules/AdminTheme/AdminThemeUikit/

Append the rest of the respective paths/filenames to the above, e.g.

<script type="text/javascript" src="<?php echo $config->urls->JqueryCore;?>jquery-1.11.1.js"></script>

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...