#1 (permalink)  
Old 08-11-2006, 10:06 PM
Registered User
 
Join Date: May 2006
Posts: 26
GremlinGod is on a distinguished road
Default Template Feature Request for 5.x

Admin CP -> Categories: View/Edit/Delete -> Edit Category (Any Category)

Scroll down to the Header Field ->

----------------------------------------------------------------
Header
Enter you html code for header of this category's page. If you leave it empty INDEXU will use cat_header.html
----------------------------------------------------------------
It actually uses header.html but that is not the point of this post.

I posted the above in the bugs area but it is relevant here. I could not find a forums for "IndexU Feature Rquests" so I am posting it here.

While I was checking out this option I figured that there was a typo there and and figured I would try something. I copied the theme header.html to cat_header.html then modified the cat_header.html I just created so I could tell if it was being displayed. Then I rebuilt the cats and tested the category which I modified. It did not work.

Also I tried using the template code options <%include file="cat_header.html"%> - This does not work either and I figured this option is not reading the template variables so I tried copying the contents of header.html with some changes so I can see the difference into the header field, rebuilt the cats again as always, but that does not work either. All the template variables do not work using the header field. So to me this header field is a useless option in my option. If you can not use the template variables here what good is it.

Then it came to me. What about a category auto-detect template feature. ie: You have a Category called "Car Wallpaper" and in the themes directory you create a file called header.car_wallpaper.html or footer.car_wallpaper.html and when a visitor goes to that directory IndexU will find the file. There are of course performance issues with this but they are easliy overcome using a /custom_tempates or /custom directory under the theme directory you are using and will only read this directory if it is flaged under the admin options for that category. And of course there is the template cache that is already in use to help this as well. :-)

This will allow a user to use includes as well as the other template variables.

Anyone want to comment on this idea?
  #2 (permalink)  
Old 08-11-2006, 11:49 PM
dody's Avatar
Nicecoder Team
 
Join Date: Aug 2001
Location: Indonesia
Posts: 3,292
dody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to all
Default

Code:
Content visible to License Owner only.
I'm sorry it's a typo. cat_header.html is removed since v5 and we only have one header file. This is not a bug, but we forgot to change the explaination above.

Code:
Content visible to License Owner only.
Nice. But it's actually the same as we have for current header/footer html code for category in admin panel. Except, we store in database while you suggest to put it in template files.
  #3 (permalink)  
Old 08-12-2006, 04:18 PM
Registered User
 
Join Date: May 2006
Posts: 26
GremlinGod is on a distinguished road
Default

Code:
Content visible to License Owner only.
Actually it is not. Your category header field option does not read template variables. I eplained that in my post which is why I suggested the auto detect template option. This would allow variables in those created templates. As your system stands now you can do nothing but add html in that header field. I suppose if I get creative I can use a conditional statment to include my own variables to change the header for specific categories... hmm now that I think about that I will test it out and post the results here to allow others to benefit from it.

However this still leaves no ablity to add in the header field an include file or php option. Maybe there could be an alternate option field about the header one for a file name?

Last edited by GremlinGod; 08-12-2006 at 06:14 PM.
  #4 (permalink)  
Old 08-13-2006, 07:47 AM
dody's Avatar
Nicecoder Team
 
Join Date: Aug 2001
Location: Indonesia
Posts: 3,292
dody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to alldody is a name known to all
Default

Code:
Content visible to License Owner only.
Good point, sorry i forgot that one.

Code:
Content visible to License Owner only.
However there's a trick to do the same job. In browse.html, do if.. then .. else ... compare with the category id
Code:
Content visible to License Owner only.
Of course you should know the correct category id
  #5 (permalink)  
Old 08-17-2006, 10:04 PM
Registered User
 
Join Date: May 2006
Posts: 26
GremlinGod is on a distinguished road
Default

Thank you... I give that a whirl and see what comes of it. :-)
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Feature' Request: Complete Language files Regenerate v5.x 10 07-21-2006 09:26 PM
Feature Request Akarin Customer Reviews 0 12-15-2005 11:02 AM
New issue tracking: submit bugs, feature request, and enhancement dody Announcements 0 02-22-2005 07:01 AM
Is the "review" feature an essential feature for INDEXU at you website? esm v5.x 7 04-28-2004 09:21 AM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 05:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate