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:lg_better_meta_pl:template | |
url_title="{last_segment}" | |
title="{if entry_title}{entry_title}{if:else}{embed:title}{/if}" | |
description="{entry_description}" | |
keywords="{entry_keywords}" | |
{if entry_title != ""} | |
hide_site_title="y" | |
{/if} | |
} |
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
<!-- Using @litzinger URL Helper plugin I added a new variable: | |
{last_segment_category_url_title} | |
This parses only if the last segment is a valid category (see case 3). I need this variable b/c {segment_3} will always parse, thus the third case returns true every time. | |
{all_segments} is perfect for the switchee variable b/c it's dynamic rather than hard coded: {segment_1}/{segment_2}/{segment_3}/{segment_4} | |
ie. | |
/products/ |
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
## BEGIN Expression Engine Rewrite | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] | |
RewriteRule ^(.*)$ /index.php?/$1 [L] | |
# END Expression Engine Rewrite |
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
// The key here is to use {all_segments} & {last_segment_category_url_title} from Litzinger's URL Helper extension. | |
// I fork'd it and added the {last_segment_category_url} to determine if the last segment is a cat or not. | |
// If {last_segment_category_url} is a category, it will parse and the case will run, if not, it defaults to single entry template | |
// {all_segments} variable is great b/c it's dynamically builds the rule, rather than a fixed variable="{seg_1}/{seg_2}/{seg_3}/{seg_4}" | |
// Controller Template. | |
{exp:switchee variable="{all_segments}" parse="inward"} | |
{case value="products"} | |
{embed="site/_product_cat" cat_seg="home"} |
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
// ==UserScript== | |
// @name Harvest Invoice Hook | |
// @namespace https://siebird.com | |
// @version 0.1 | |
// @description Harvest invoice status hook to send POST to Zapier to update Google spreadsheet row | |
// @include /^https:\/\/\w+\.harvestapp\.com\/invoices\/[0-9]+/ | |
// @exclude /^https:\/\/\w+\.harvestapp\.com\/invoices\/[0-9]+\/duplicate | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js | |
// ==/UserScript== |
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
/* | |
A bookmarket to convert a live URL to a DDEV URL. To install bookmarklet: | |
- right click in bookmark bar or go to bookmark manager to add new page in your browser | |
- click `add page` | |
- name 'DDEV URL` or whatever you want | |
- copy and paste the code below into the URL field. Lines 9-16. | |
*/ | |
javascript:(function(){ | |
const url = window.location.href; |