Page 1 of 1
static page: staticpage-entries-listing.tpl
Posted: Sat Dec 18, 2010 6:31 pm
by Don Chambers
I was modifying this file for a template and realized a minor revision should be made.
Current:
Code: Select all
{* for normal static pages *}
» <a href="{$serendipityBaseURL}{getCategoryLinkByID cid=$staticpage_related_category_id}
">{$CONST.STATICPAGE_ARTICLE_OVERVIEW}</a><br />
The above needs {$serendipityRewritePrefix} after serendiptiyBaseURL. Its also preferable to use » instead of » so I would recommend this:
Code: Select all
{* for normal static pages *}
» <a href="{$serendipityBaseURL}{$serendipityRewritePrefix}{getCategoryLinkByID cid=$staticpage_related_category_id}
">{$CONST.STATICPAGE_ARTICLE_OVERVIEW}</a><br />
I never installed cvs or svn on this new computer, so I cannot commit the change. If there are no objections, perhaps someone else can do it?
Re: static page: staticpage-entries-listing.tpl
Posted: Sat Dec 18, 2010 6:41 pm
by Don Chambers
I also wanted the list of related entries to look like the output from the recent entries plugin. So, if anyone wants that (which could be committed if no one objects), change this:
Code: Select all
<ul>
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
<li class="static-entries">
({$dategroup.date|date_format:"%d.%m.%Y"}) <a href="{$entry.link}">{$entry.title|@default:$entry.id}</a>
</li>
{/foreach}
{/foreach}
</ul>
to this:
Code: Select all
<dl>
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
<dt class="serendipity_recententries_entrylink"><a href="{$entry.link}" title="{$entry.title|@default:$entry.id}">{$entry.title|@default:$entry.id}</a></dt>
<dd class="serendipity_recententries_entrydate serendipitySideBarDate">{$dategroup.date|@formatTime:"%A, %B %e. %Y"}</dd>
{/foreach}
{/foreach}
</dl>
Re: static page: staticpage-entries-listing.tpl
Posted: Sun Dec 19, 2010 12:01 am
by garvinhicking
Hi!
Actually, get smarty function should automatically add the indexFile parameter, because the function call is routed through:
(smarty.inc.php) smarty_getCategoryLinkByID -> (functions_permalinks.inc.php) serendipity_getpermalink() -> serendipity_rewriteURL()
About the hexcode/raquo thing - just for personal interest, in which way is it better to not use raquo?
I'd prefer to not change the layout to the entrylinks output, because other people might not have that plugin installed and thus the CSS would not be applied?
Regards,
Garvin
Re: static page: staticpage-entries-listing.tpl
Posted: Sun Dec 19, 2010 12:28 am
by Don Chambers
I'm testing it with the 1.5.4 and the latest release of the static page plugin, and it does not work without {$serendipityRewritePrefix} if the site is not configured for URL rewriting.... without it, the link points to /categories/3-whatever instead of index.php?/categories/3-whatever.
As far as the definition list vs. unordered list, I put that there more for anyone who may want to use the same technique.. I do not think the recent entries plugin emits any css, so not having it installed should have no effect.