-
-
Save curtisblackwell/1143457 to your computer and use it in GitHub Desktop.
eecms: <title> using stash and switchee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<title>{exp:stash:get name="title"}</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:stash:set name="title"} | |
{exp:switchee variable="{last_segment}" parse="inward"} | |
{case value="" default="Yes"} | |
{site_name} | [INSERT SITE SLOGAN HERE] | |
{/case} | |
{case value="404"} | |
404 Not Found | {site_name} | |
{/case} | |
{!-- Second value checks for pagination --} | |
{case value="{segment_1}|#^P(\d+)$#"} | |
{channel} | {site_name} | |
{/case} | |
{case value="{segment_2}"} | |
{title} | {channel} | {site_name} | |
{/case} | |
{/exp:switchee} | |
{/exp:stash:set} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:stash:set name="title"} | |
{switchee variable="{last_segment}" parse="inward"} | |
{case value="" default="Yes"} | |
{site_name} | [INSERT SITE SLOGAN HERE] | |
{/case} | |
{case value="404"} | |
404 Not Found | {site_name} | |
{/case} | |
{!-- Second value checks for pagination --} | |
{case value="{segment_1}|#^P(\d+)$#"} | |
{channel} | {site_name} | |
{/case} | |
{case value="{segment_2}"} | |
{title} | {channel} | {site_name} | |
{/case} | |
{/switchee} | |
{/exp:stash:set} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment