Created
July 18, 2014 09:19
-
-
Save rchavik/4aacc334943845d97876 to your computer and use it in GitHub Desktop.
idea for element
This file contains hidden or 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
<?php | |
if (!isset($latestNews)): | |
$result = ClassRegistry::init('Nodes.Node')->find('promoted'); | |
$latestNews = $result[0]; | |
endif; | |
if (!isset($latestPlace)): | |
$result = ClassRegistry::init('MyPlugin.Place')->find('latestPlace'); | |
$latestPlace = $result[0]; | |
endif; | |
if (!isset($latestEvent)): | |
$result = ClassRegistry::init('MyPlugin.Event')->find('latestEvent'); | |
$latestEvent = $result[0]; | |
endif; | |
?> | |
<div class="column3"> | |
<?php if (!empty($latestNews)): ?> | |
<?php echo print_r($latestNews); ?> | |
<?php endif; ?> | |
| |
</div> | |
<div class="column3"> | |
<?php if (!empty($latestPlace)): ?> | |
<?php echo print_r($latestPlace); ?> | |
<?php endif; ?> | |
| |
</div> | |
<div class="column3"> | |
<?php if (!empty($latestEvent)): ?> | |
<?php echo print_r($latestEvent); ?> | |
<?php endif; ?> | |
| |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment