CodeIgniter Forums
Template Library Version 1.4.1 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Template Library Version 1.4.1 (/showthread.php?tid=12840)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


Template Library Version 1.4.1 - El Forum - 06-05-2012

[eluser]winminsoe[/eluser]
Thanks !

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

Cheers,


Template Library Version 1.4.1 - El Forum - 06-17-2012

[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


Template Library Version 1.4.1 - El Forum - 06-18-2012

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

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

Hope it would help.


Template Library Version 1.4.1 - El Forum - 07-16-2012

[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?




Template Library Version 1.4.1 - El Forum - 07-26-2012

[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


Template Library Version 1.4.1 - El Forum - 07-26-2012

[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".


Template Library Version 1.4.1 - El Forum - 07-26-2012

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


Template Library Version 1.4.1 - El Forum - 07-27-2012

[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.


Template Library Version 1.4.1 - El Forum - 07-28-2012

[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');



Template Library Version 1.4.1 - El Forum - 08-19-2012

[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]