Joomla – Detect homepage in extensions
Here's a little tip to detect, in your Joomla extensions, if the Frontend user is on the Homepage.
-
// Your code for Homepage
-
}
Tell me if it bugs for you, but for me on 1.5.21 it's ok
TYPO3 : tt_news GIFBUILDER news title
If you want, like me, make your news title builded as a nice image with cool font, you can use this snippet.
Of course, you can do the same for the other wraps ![]()
(remove spaces in HTML line 6)
-
-
10 = COA
-
10 {
-
wrap = < div style ="background -repeat: no-repea t; | ">
-
-
10 = IMG_RESOURCE
-
10 {
-
-
file {
-
XY = [10.w],[10.h]+10
-
format = gif
-
quality = 100
-
backColor = #333333
-
-
10 = TEXT
-
10 {
-
text.field = title
-
text.case = upper
-
fontSize = 14
-
fontColor = #ffffff
-
fontFile = {$lib.conf.template}fonts/TrajanPro-Bold.otf
-
niceText = 1
-
offset = 0,16
-
breakWidth = 286
-
}
-
}
-
}
-
-
20 = TEXT
-
20 {
-
wrap = width: | px;
-
value = 286
-
}
-
}
-
-
-
20 = TEXT
-
20 {
-
wrap = <span class="hideMe"> | </span>
-
field = title
-
}
-
}
This code is easily extensible.
Hope it helps you
Magento : Add sorting condition
Today, I add to make my category menu reflect the category order in the backend (not ordered by name).
The only thing you have to do is to add "addAttributeToSort('attName', 'sortDirection')" in your template the next function in the loading instruction.
$collection = Mage::getResourceModel(’catalog/category_collection’)
->addAttributeToSelect(’name’)
->addAttributeToSort('position', 'asc')
->addAttributeToFilter('is_active', 1)
->load();
Hope it'll help you too.
Enjoy
Google Summer of Code 2010 coming up
As you know (or not), TYPO3 was in the Google Summer of Code 2009 and it was very successful. TYPO3 team want to do better this year. Take a look about what they wrote.
We are excited that Google Summer of Code is underway again this year. After having had a successful first Google Summer of Code last year, we are happy to also apply for GSoC 2010.
We're looking for help to make this years Summer of Code even better than last year and are asking you to think about how things could improve.
Read the full article
jQuery – Element exists ?
Here's a very small snippet about how to know if a Dom element is on the document with jQuery
-
var myElement = $('#myElement');
-
if (myElement.size() == 0) {
-
// Element doesn't exists
-
} else {
-
// Element exists
-
}
