How do I use regular html pages instead of the templates?
Jun 27, 2001, 3:55 PM
Novice (30 posts)
Jun 27, 2001, 3:55 PM
Post #3 of 16
Views: 6839
This is where I lost track:
# Use Templates: instead of editing site_html.pl, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.pl, but it
# may be easier.
$build_use_templates = 0;
Where are the instructions on how to perform this?
# Use Templates: instead of editing site_html.pl, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.pl, but it
# may be easier.
$build_use_templates = 0;
Where are the instructions on how to perform this?
Jun 27, 2001, 7:33 PM
Veteran (17240 posts)
Jun 27, 2001, 7:33 PM
Post #5 of 16
Views: 6823
Based on your "confusion", I would recommend using TEMPLATES...by NOT using templates, you will have to edit the site_html.pl, which is full of Perl codes...
Stick with templates...set that variable to 1 and then edit the template files.
Regards,
Eliot Lee
Stick with templates...set that variable to 1 and then edit the template files.
Regards,
Eliot Lee
Jun 27, 2001, 7:39 PM
Veteran / Moderator (1936 posts)
Jun 27, 2001, 7:39 PM
Post #6 of 16
Views: 6834
Like all the other "flag" variables: '0' is 'no', '1' is 'yes'. (this is even mentioned in links.cfg)
...although I thought that variable as set to 1 by default now?
did you even try?
--Drew
Links 2.0 stuff
http://www.camelsoup.com
...although I thought that variable as set to 1 by default now?
did you even try?
--Drew
Links 2.0 stuff
http://www.camelsoup.com
Jun 27, 2001, 7:49 PM
Novice (30 posts)
Jun 27, 2001, 7:49 PM
Post #7 of 16
Views: 6796
Try what? I set the variable to 0 because I want to try to use different templates for each category. On the top of each category I want a targeted banner that suits that audience. Please try and explain this to me. I have been trying for about 10 hours now searching through the forum. I would really like to have a different banner in each category.
Jun 27, 2001, 8:11 PM
Veteran (17240 posts)
Jun 27, 2001, 8:11 PM
Post #9 of 16
Views: 6816
Uh...using 0 will TURN OFF TEMPLATES!
You need to use 1...
LIKE the following:
$build_use_templates = 1;
IF you want to use different CATEGORY TEMPLATE{/b] files, then you need to use the Multiple Category Template Mod, which is linked in the Resources section!
Regards,
Eliot Lee
You need to use 1...
LIKE the following:
Code:
$build_use_templates = 1;
IF you want to use different CATEGORY TEMPLATE{/b] files, then you need to use the Multiple Category Template Mod, which is linked in the Resources section!
Regards,
Eliot Lee
Jun 27, 2001, 8:22 PM
Novice (30 posts)
Jun 27, 2001, 8:22 PM
Post #11 of 16
Views: 6851
OK...I will give this a try. The following is a peice of the multiple template code. So if the category name was "cars" and that file was located in www.cars.com/types/cars.htm is the code below right?
Add the following (in blue):
my $template;
# Set the appropriate template file to load
if ($category_name =~ /^Category1/) {
$template = "cat1.html"; }
elsif ($category_name =~ /^Category2/) {
$template = "cat2.html"; }
elsif ($category_name =~ /^Category3/) {
$template = "cat3.html"; }
else { $template = "category.html"; }
($category_name =~ /^cars/) {
$template = "/types/cars.htm"; }
Is this right?
Add the following (in blue):
my $template;
# Set the appropriate template file to load
if ($category_name =~ /^Category1/) {
$template = "cat1.html"; }
elsif ($category_name =~ /^Category2/) {
$template = "cat2.html"; }
elsif ($category_name =~ /^Category3/) {
$template = "cat3.html"; }
else { $template = "category.html"; }
($category_name =~ /^cars/) {
$template = "/types/cars.htm"; }
Is this right?
Jun 27, 2001, 9:06 PM
Veteran (17240 posts)
Jun 27, 2001, 9:06 PM
Post #12 of 16
Views: 6880
No...you need to have ALL the template files in the template folder! LINKS 2.0 will not allow you to select another file outside of the TEMPLATE directory. LINKS SQL does, but not LINKS 2.0....
The following codes that you posted:
$template = "/types/cars.htm";
MUST be:
$template = "cars.htm";
AND cars.htm MUST be in the template folder!
Got it???
Regards,
Eliot Lee
The following codes that you posted:
Code:
$template = "/types/cars.htm";
MUST be:
Code:
$template = "cars.htm";
AND cars.htm MUST be in the template folder!
Got it???
Regards,
Eliot Lee
Jun 27, 2001, 9:08 PM
Novice (33 posts)
Jun 27, 2001, 9:08 PM
Post #13 of 16
Views: 6809
Pardon me,
But you don't seem to understand the concept behind links. All of the template files go in your
/cgi-bin/links/admin/templates/
folder.
When you create a category a directory is created in your
mydomain/links/pages/
folder that is the name of your category,
thus if your category name is "cars" the index file with your links will reside in
mydomain/links/pages/cars/
and your template "cars.htm" will reside in the template folder as already stated.
Try reasoning this out before you proceed and you'll save yourself a lot of time.
But you don't seem to understand the concept behind links. All of the template files go in your
/cgi-bin/links/admin/templates/
folder.
When you create a category a directory is created in your
mydomain/links/pages/
folder that is the name of your category,
thus if your category name is "cars" the index file with your links will reside in
mydomain/links/pages/cars/
and your template "cars.htm" will reside in the template folder as already stated.
Try reasoning this out before you proceed and you'll save yourself a lot of time.
Jun 27, 2001, 10:45 PM
Novice (30 posts)
Jun 27, 2001, 10:45 PM
Post #14 of 16
Views: 6835
I seem to be off track still. In the directory:
/cgi-bin/links/admin/templates/
I uploaded cars.htm
I made a category called cars that resides here
mydomain/links/pages/cars/
Everytime I add a test link, it creates the default template (not my template) in:
mydomain/links/pages/cars/index.htm
How come it doesn't create?:
mydomain/links/pages/cars/cars.htm
This is how I set the variables:
my $template;
# Set the appropriate template file to load
if ($category_name =~ /^cars/) {
$template = "cars.htm"; }
else { $template = "category.html"; }
Are these right? I uploaded cars.htm to the templates file and created a category called cars.
/cgi-bin/links/admin/templates/
I uploaded cars.htm
I made a category called cars that resides here
mydomain/links/pages/cars/
Everytime I add a test link, it creates the default template (not my template) in:
mydomain/links/pages/cars/index.htm
How come it doesn't create?:
mydomain/links/pages/cars/cars.htm
This is how I set the variables:
my $template;
# Set the appropriate template file to load
if ($category_name =~ /^cars/) {
$template = "cars.htm"; }
else { $template = "category.html"; }
Are these right? I uploaded cars.htm to the templates file and created a category called cars.
Jun 28, 2001, 5:33 AM
Novice (33 posts)
Jun 28, 2001, 5:33 AM
Post #15 of 16
Views: 6787
Okay, hang in there, you're getting closer. The index.htm in
mydomain/links/pages/cars/index.htm
is your static html page that is viewed by your visitors. It contains the information from your template file cars.htm and the information loaded into it from your links database. In otherwords, it is functioning exactly as it is suppose to be functioning!
Users don't look for a page called "cars.htm", they choose a category from your home page, or category page, or your search engine called cars or containing cars and voila through the magic of perl they are transfered automatically to
mydomain/links/pages/cars/index.htm
which just by luck and good planning happens to be your "cars" category page based on your "cars.htm" template.
It is called index.htm so that it is the default file in that directory. Once you get used to the idea, you'll see that this is actually a very sensible way to organize your directories, database and links, and will wonder why you have been trying to swim upstream all this time.
mydomain/links/pages/cars/index.htm
is your static html page that is viewed by your visitors. It contains the information from your template file cars.htm and the information loaded into it from your links database. In otherwords, it is functioning exactly as it is suppose to be functioning!
Users don't look for a page called "cars.htm", they choose a category from your home page, or category page, or your search engine called cars or containing cars and voila through the magic of perl they are transfered automatically to
mydomain/links/pages/cars/index.htm
which just by luck and good planning happens to be your "cars" category page based on your "cars.htm" template.
It is called index.htm so that it is the default file in that directory. Once you get used to the idea, you'll see that this is actually a very sensible way to organize your directories, database and links, and will wonder why you have been trying to swim upstream all this time.
Jun 28, 2001, 4:57 PM
Novice (30 posts)
Jun 28, 2001, 4:57 PM
Post #16 of 16
Views: 6795
The script works!! Its modification from here on. I have 2 questions (let me know if you want me to start posting in the customization forum):
I want to use an "new image" for the new links, instead of the text with the red box. So I modified link.html
<%if isNew%>
<small><sup class="new">new</sup></small>
<%endif%>
Here is what I did to try to use the image:
<%if isNew%>
<img src="http://www.mysite.com/images/new1.jpg" width="33" height="11" alt="New Link!">
<%endif%>
After I modified the link.html page in the templates file to look like this, it completely stopped posting links from the database. Any suggestions?
Question #2
I tried to get the links to appear in a numbered list with this:
<ol></ol>
I keep getting a bulleted list. I edit through frontpage and publish with WS_FTP, maybe that is the code for frontpage only. Any suggestions here?
I want to use an "new image" for the new links, instead of the text with the red box. So I modified link.html
<%if isNew%>
<small><sup class="new">new</sup></small>
<%endif%>
Here is what I did to try to use the image:
<%if isNew%>
<img src="http://www.mysite.com/images/new1.jpg" width="33" height="11" alt="New Link!">
<%endif%>
After I modified the link.html page in the templates file to look like this, it completely stopped posting links from the database. Any suggestions?
Question #2
I tried to get the links to appear in a numbered list with this:
<ol></ol>
I keep getting a bulleted list. I edit through frontpage and publish with WS_FTP, maybe that is the code for frontpage only. Any suggestions here?