Welcome Guest, Not a member yet? Register   Sign In
Template Library Version 1.4.1

[eluser]winminsoe[/eluser]
Thanks !

i haven't think about it.Yes! i can do like that.

Cheers,

[eluser]Unknown[/eluser]
hello everyone, this is my first post, i wonder if we can get the current default template or the current template that we use from the library or config file maybe, i want to use the return value to set the template for each controller, to choose one of multiple template

[eluser]winminsoe[/eluser]
You can get which template are loaded by this

Code:
echo $this->template->master;

Hope it would help.

[eluser]Unknown[/eluser]
Hi, thanks a lots for creating library so great like this!
But i wonder if I can load view files that is not in views folder?

Ex:
Code:
application
--views
  --index.php
public
--template
  --index.php

i want to load a view that is in public/template folder not in views folder. How can i do that?


[eluser]jmadsen[/eluser]
For those of you interested:

Project doesn't seem to be under active development & doesn't have a public repo that I could find, so I've create a repo with a modification I needed:

https://github.com/jrmadsen67/williamsconcepts-template

I have added a param to the add_js() & add_css() to allow you to tag a version number onto the files so your users will always have latest version pushed without hard-refreshing

[eluser]CroNiX[/eluser]
@jmadson - I did something similar except used the file last modified time (filemtime()) as the "version" (more specifically, a timestamp of the filemtime), so it would only change if the file was updated. Kind of an "auto versioning".

[eluser]jmadsen[/eluser]
that's exactly what I did ;-)

[eluser]CroNiX[/eluser]
Ah cool. The way I read it was it sounded like it gave you the option to provide the version number, like manually.

[eluser]Unknown[/eluser]
Hi there.

I was wondering if it is possible to specify default assets in the config file instead of having to include the same asset in every view? (I am fairly new to Code Igniter so might be missing something important here)

Something like this would be great instead of having to call the helper method to add things to $_styles:
Code:
$template['default']['style'] = array('assets/css/main.css');

[eluser]MissYeh[/eluser]
I'm wondering if anyone came accross the following issue.

When accessing a page, for some reason is it accessed 3x. I noticed this when I wanted to increment a view with 1 on access of a page. Instead of 1 it added 3.

After some logging here and there and making sure that I didn't call the increment function more than 1x, I can only conclude that my view is called 3x. I have not yet found out the cause.

Please let me know if anyone has this issue.

I'm using CI 2.1.0 and HVMC

--------------------------------------------------------------------------------

UPDATE: The issue was caused by the following 2 lines I had in the HEAD of my template file. I left these javascript file inclusion lines in it for later use but each of them made CI access the method 1 extra time.

Because I am not able to post the 2 lines, I replace the < with [ and > with ]

[script type="text/javascript" src=""][/script]

[script type="text/javascript" src=""][/script]







Theme © iAndrew 2016 - Forum software by © MyBB