Skip to content

Instantly share code, notes, and snippets.

@akroii
Last active December 18, 2020 16:24
Show Gist options
  • Save akroii/458b9a2902a0a06d93d36c0aef75ae65 to your computer and use it in GitHub Desktop.
Save akroii/458b9a2902a0a06d93d36c0aef75ae65 to your computer and use it in GitHub Desktop.
find content by id of its page
$objPage = \PageModel::findByIdOrAlias( $alias );
$strUrl = $this->generateFrontendUrl( $objPage->row() );
$strUrl = $this->replaceInsertTags('{{link_url::pageAlias}}');
@akroii
Copy link
Author

akroii commented Oct 5, 2016

<?php
$id = 28; 
$objPage = \PageModel::findPublishedById( $id ); 
$strUrl = $this->generateFrontendUrl( $objPage->row() ); 

@akroii
Copy link
Author

akroii commented Feb 8, 2017

If inserttag is in TL_HEAD or TL_BODY:
\Controller::replaceInsertTags('{{file::cdbe6d70-dcb2-11e6-9352-b193cb3fda88}}',false);

@akroii
Copy link
Author

akroii commented Oct 29, 2020

<?php

global $objPage;
//$objPage->alias;
//$objPage->id;

@akroii
Copy link
Author

akroii commented Dec 18, 2020

$foo = \Input::get('auto_item');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment