Skip to content

Commit

Permalink
Make LINK REL stuff a separate template
Browse files Browse the repository at this point in the history
  • Loading branch information
pudge committed May 22, 2002
1 parent b1acd89 commit 50446b1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 21 deletions.
1 change: 1 addition & 0 deletions themes/slashcode/THEME
Expand Up @@ -125,6 +125,7 @@ template=templates/isEligible;metamod;default
template=templates/linkComment;misc;default template=templates/linkComment;misc;default
template=templates/linkCommentPages;misc;default template=templates/linkCommentPages;misc;default
template=templates/linkStory;misc;default template=templates/linkStory;misc;default
template=templates/linkrel;misc;default
template=templates/listTopics;topics;default template=templates/listTopics;topics;default
template=templates/lockTest;misc;default template=templates/lockTest;misc;default
template=templates/loginForm;users;default template=templates/loginForm;users;default
Expand Down
1 change: 1 addition & 0 deletions themes/slashcode/templates/header;misc;admin
Expand Up @@ -11,6 +11,7 @@ en_US
__name__ __name__
header header
__template__ __template__
[% INCLUDE linkrel %]
</HEAD> </HEAD>
<BODY BGCOLOR="[% user.bg.1 %]" LINK="[% user.bg.3 %]" VLINK="[% user.bg.3 %]" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0"> <BODY BGCOLOR="[% user.bg.1 %]" LINK="[% user.bg.3 %]" VLINK="[% user.bg.3 %]" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">


Expand Down
21 changes: 1 addition & 20 deletions themes/slashcode/templates/header;misc;default
Expand Up @@ -13,26 +13,7 @@ en_US
__name__ __name__
header header
__template__ __template__
[%# reserved for article.pl links only ... others possible. %] [% INCLUDE linkrel %]
[%# journals, comments, admin story list? %]
[%# should this be a separate template? %]
[% IF env.script_name.search('article\.pl') -%]
[%- IF link.prev %]
<LINK REL="prev" HREF="[% constants.rootdir %]/article.pl?sid=[% link.prev.sid %]" TITLE="[% link.prev.title | strip_attribute %]">
[%- END ; IF link.next %]
<LINK REL="next" HREF="[% constants.rootdir %]/article.pl?sid=[% link.next.sid %]" TITLE="[% link.next.title | strip_attribute %]">
[%- END ; IF link.author # author is uid %]
<LINK REL="author" HREF="[% constants.rootdir %]/search.pl?op=stories&amp;author=[% link.author %]">
[%- END ;
ELSE ; # default author link, where author is a nickname
IF link.author %]
<LINK REL="author" HREF="[% constants.rootdir %]/~[% link.author | fixparam %]/" TITLE="[% link.author | strip_attribute %]">
[%- END ;
END ; IF link.section %]
<LINK REL="parent" HREF="[% constants.rootdir %]/index.pl?section=[% link.section | fixparam %]" TITLE="[% link.section | strip_attribute %]">
[%- END %]
<LINK REL="top" HREF="[% constants.rootdir %]/" TITLE="[% constants.slogan | strip_attribute %]">
<LINK REL="search" HREF="[% constants.rootdir %]/search.pl" TITLE="Search [% constants.sitename | strip_attribute %]">
</HEAD> </HEAD>
<BODY BGCOLOR="[% user.bg.0 %]" TEXT="[% user.fg.1 %]" LINK="[% user.bg.3 %]" VLINK="[% user.fg.1 %]"> <BODY BGCOLOR="[% user.bg.0 %]" TEXT="[% user.fg.1 %]" LINK="[% user.bg.3 %]" VLINK="[% user.fg.1 %]">


Expand Down
2 changes: 1 addition & 1 deletion themes/slashcode/templates/header;misc;light
Expand Up @@ -11,7 +11,7 @@ en_US
__name__ __name__
header header
__template__ __template__
[% USE Slash %] [% INCLUDE linkrel %]
</HEAD> </HEAD>
<BODY> <BODY>


Expand Down
37 changes: 37 additions & 0 deletions themes/slashcode/templates/linkrel;misc;default
@@ -0,0 +1,37 @@
__section__
default
__description__
Add LINK REL navigation stuff for header

No specially passed variables
__title__

__page__
misc
__lang__
en_US
__name__
linkrel
__template__
[%# reserved for article.pl links only ... others possible. %]
[%# journals, comments, admin story list? %]
[% IF env.script_name.search('article\.pl') -%]
[%- IF link.prev %]
<LINK REL="prev" HREF="[% constants.rootdir %]/article.pl?sid=[% link.prev.sid %]" TITLE="[% link.prev.title | strip_attribute %]">
[%- END ; IF link.next %]
<LINK REL="next" HREF="[% constants.rootdir %]/article.pl?sid=[% link.next.sid %]" TITLE="[% link.next.title | strip_attribute %]">
[%- END ; IF link.author # author is uid %]
<LINK REL="author" HREF="[% constants.rootdir %]/search.pl?op=stories&amp;author=[% link.author %]">
[%- END ;
ELSE ; # default author link, where author is a nickname
IF link.author %]
<LINK REL="author" HREF="[% constants.rootdir %]/~[% link.author | fixparam %]/" TITLE="[% link.author | strip_attribute %]">
[%- END ;
END ; IF link.section %]
<LINK REL="parent" HREF="[% constants.rootdir %]/" TITLE="[% link.section | strip_attribute %]">
[%- END %]
<LINK REL="top" HREF="[% constants.real_rootdir %]/" TITLE="[% constants.slogan | strip_attribute %]">
<LINK REL="search" HREF="[% constants.rootdir %]/search.pl" TITLE="Search [% constants.sitename | strip_attribute %]">

__seclev__
10000

0 comments on commit 50446b1

Please sign in to comment.