Static pages with 1.7-rc3

Found a bug? Tell us!!
Post Reply
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Static pages with 1.7-rc3

Post by Don Chambers »

Discovered an issue with static page navigation.

The static page plugin provides navigation (previous, top, next). I didn't like it very much, and changed it slightly in this page.

This navigation, and breadcrumb, will display at the top of static pages by the static plugin unless overridden by a specific theme. Bulletproof has an override template, but it is formatting changes only - the navigation and breadcrumb should still work. 2k11 has its own static page template that does not show either the navigation, or breadcrumb.

I am testing with the static page plugin 4.01. Bulletproof's static page template, which is nearly identical to the plugin's version, is as follows:

Code: Select all

{if $staticpage_navigation AND $staticpage_shownavi}
    <ul class="staticpage_navigation">
      <li class="staticpage_navigation_left"><a href="{$staticpage_navigation.prev.link}" title="prev">{$staticpage_navigation.prev.name|@escape}</a></li>
      <li class="staticpage_navigation_center"><a href="{$staticpage_navigation.top.link}" title="top">{$staticpage_navigation.top.name|@escape}</a></li>
      <li class="staticpage_navigation_right"><a href="{$staticpage_navigation.next.link}" title="next">{$staticpage_navigation.next.name|@escape}</a></li>
    </ul>
{/if}
{if $staticpage_show_breadcrumb}
    <div class="staticpage_navigation_center">
	<a href="{$serendipityBaseURL}">{$CONST.HOME|lower|capitalize:true}</a>&nbsp;&raquo;
      {foreach name="crumbs" from=$staticpage_navigation.crumbs item="crumb"}
      {if !$smarty.foreach.crumbs.first}&raquo;&nbsp;{/if}{if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{$crumb.name|@escape}</a>{else}{$crumb.name|@escape}{/if}
      {/foreach}
    </div>
{/if}
These are the two key logical conditions:
{if $staticpage_navigation AND $staticpage_shownavi}
{if $staticpage_show_breadcrumb}

I have modified bulletproof's plugin_staticpage.tpl to show those values. I have two TEMPORARY static pages here:

http://www.optional-necessity.com/kinet ... rtcar.html
http://www.optional-necessity.com/kinet ... econd.html

The top navbar of that test site has navlinks to both pages, as well as "home".
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Static pages with 1.7-rc3

Post by Timbalu »

Hmmm, I was willing.... but I really don't get the actual question... :roll:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Static pages with 1.7-rc3

Post by Don Chambers »

I fixed most of what I wanted. Will commit.
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Static pages with 1.7-rc3

Post by Timbalu »

Commit?
The breadcrumb is still confusing.... - why does it not show second if in smart? ( smart Third → )
Is that because named second is third (page depth) and vice versa, actually?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply