Skip to content

Instantly share code, notes, and snippets.

Paul Rohrbeck paulrohrbeck

Block or report user

Report or block paulrohrbeck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paulrohrbeck
paulrohrbeck / aem_style_selector
Created Mar 7, 2014
Adobe CQ/AEM: Add style selector for text component. To be added in .content.xml under /etc/designs/...abc.../
View aem_style_selector
<basepage jcr:primaryType="nt:unstructured">
<mainParagraph
jcr:lastModified="{Date}2014-01-17T17:44:04.712-08:00"
jcr:lastModifiedBy="admin"
jcr:primaryType="nt:unstructured"
components="[group:General,group:Columns,group:Form]">
<section jcr:primaryType="nt:unstructured"/>
<text jcr:primaryType="nt:unstructured">
<cq:styles jcr:primaryType="nt:unstructured">
<columns
@paulrohrbeck
paulrohrbeck / delete-translation-projects.groovy
Last active Mar 7, 2017
AEM: delete all translation projects and associated data (to be executed in Groovy console)
View delete-translation-projects.groovy
import com.adobe.cq.projects.api.*;
import org.apache.jackrabbit.api.security.user.*;
ProjectFilter pf = new ProjectFilter();
Boolean dryRun = true;
List<String> templates = Arrays.asList("/libs/cq/core/content/projects/templates/create-translation-project");
pf.setProjectTemplates(templates);
ProjectManager pm = resourceResolver.adaptTo(ProjectManager.class);
@paulrohrbeck
paulrohrbeck / aem_querybuilder_snippets
Created Oct 31, 2014
AEM/CQ Querybuilder snippet
View aem_querybuilder_snippets
Find pages with CUG on it:
path=/content
type=cq:PageContent
property=cq:cugEnabled
property.value=true
@paulrohrbeck
paulrohrbeck / aem_find_i18n_strings.txt
Last active Aug 12, 2016
AEM: Finds all i18n strings in Sightly HTML files
View aem_find_i18n_strings.txt
# Run in parent Maven project to find all:
grep -riohE '\$\{(.)* ?@ ?i18n\}' .
# Example result: ${'Filter' @ i18n}
@paulrohrbeck
paulrohrbeck / typo3_typoscript_register
Last active Jan 2, 2016
TYPO3, TypoScript: navigation using 'Foundation' classes. In the register we calculate which column class the div should get. (@see http://lists.typo3.org/pipermail/typo3-english/2010-December/072420.html)
View typo3_typoscript_register
lib.navigation.secondary = HMENU
lib.navigation.secondary {
entryLevel = 1
stdWrap.dataWrap = <div class="row large-10 small-centered large-centered columns">|</div>
1 = TMENU
1 {
NO {
@paulrohrbeck
paulrohrbeck / readme.md
Last active Jan 2, 2016
TYPO3, TypoScript: This little snippet changes the title tag for the news plugin (tx_news, not tx_ttnews) when just one page is used for the plugin, displaying both list and detail view. Without this the title would just be "Blog" (or whatever you set in the backend). Please note that for the single view you may use the built-in TitleTagViewHelp…
View readme.md

TYPO3, TypoScript: This little snippet changes the title tag for the news plugin (tx_news, not tx_ttnews) when just one page is used for the plugin, displaying both list and detail view. Without this the title would just be "Blog" (or whatever you set in the backend). Please note that for the single view you may use the built-in TitleTagViewHelper.

Results in:

  • Blog (main page)
  • Blog - page 2 (pagination, also see pagebrowse extension)
  • 12/2013 - Blog (Archive by month)
  • 12/2013 - page 2 - Blog
  • General - Blog (category)
  • General - page 2 - Blog (category)
@paulrohrbeck
paulrohrbeck / typo3_randomimage
Last active Jan 1, 2016
TYPO3: Random image, not cached, pulled from media reference on page record.
View typo3_randomimage
lib.randomImage = COA_INT
lib.randomImage {
10 = IMAGE
10 {
file {
import = uploads/media/
import.data = levelmedia:-1, slide
import.listNum = rand
width = 1000
height = 500c
@paulrohrbeck
paulrohrbeck / typo3_hide_tcefields.txt
Created Nov 15, 2013
TYPO3, Typoscript: Hide/rename backend fields
View typo3_hide_tcefields.txt
http://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TCEform/Index.html
TCEFORM.[put the table name here].[put the field name here].disabled = 1
@paulrohrbeck
paulrohrbeck / adobe_cq_dev_instance.txt
Created Nov 13, 2013
Adobe CQ/AEM: Setting up new dev author instance. Working doc to keep track to things I need to do for setting up a local dev env.
View adobe_cq_dev_instance.txt
-------------------------------
- download/install "Content Compare and Import tool":
http://helpx.adobe.com/experience-manager/kb/support-tool-installation.html
https://www.adobeaemcloud.com/content/marketplace/marketplaceProxy.html?packagePath=/content/companies/public/adobe/packages/helper/Daycare%20Support%20Tools
-------------------------------
- disable Impression Importer:
http://helpx.adobe.com/experience-manager/kb/invalidpollingconfiguration.html
@paulrohrbeck
paulrohrbeck / typo3_extbase_parseRTE_controller.txt
Created Nov 13, 2013
TYPO3, Extbase: Instead of using the <f:format.html> ViewHelper to parse a RTE database field with the usual TypoScript lib, use it inside a controller. This is useful for instance if we pass something back as JSON. (this not special - it's actually borrowed from the original ViewHelper - I just wanted to keep it around in case I need it again)
View typo3_extbase_parseRTE_controller.txt
protected $cObj;
$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$rteText = $this->cObj->parseFunc($anyObject->getDescription(), array(), '< lib.parseFunc_RTE');
You can’t perform that action at this time.