how to give the blogs an individual id?
Permalink Browser Info Environment
I need a sub navigation (with query) to call / jump to the teasers.
For this I need a function that adds number-IDs to each "ccm-page-list-description" <div>.
I tried this <div class="ccm-page-list-description" id="pagecontent<?php echo $bID ?>"> but the result was always the same number / ID.
For this I need a function that adds number-IDs to each "ccm-page-list-description" <div>.
I tried this <div class="ccm-page-list-description" id="pagecontent<?php echo $bID ?>"> but the result was always the same number / ID.
Type: | Discussion |
---|---|
Status: | New |
bID is the "block id", so yeah that's going to be the same anywhere in the block's code. I think what you want is the id of the page that you're listing, which is called the "Collection ID". This code should give you that:
With this I get a fatal error, is get the right way?
.
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); // now that we're in the specialized content file for this block type, // we'll include this block type's class, and pass the block to it, and get // the content if (count($cArray) > 0) { ?> <div class="ccm-page-list"> <?php $excerptBlocks = ($controller->truncateSummaries ? 1 : null); //1 is the number of blocks to include in the excerpt $truncateChars = ($controller->truncateSummaries ? $controller->truncateChars : 0); $plth = Loader::helper('page_list_teasers', 'page_list_teasers'); for ($i = 0; $i < count($cArray); $i++ ) { $cobj = $cArray[$i]; if (version_compare(APP_VERSION, '5.4.1', '<')) { $target = '';
Viewing 15 lines of 43 lines. View entire code block.
Yes! It works
Thanx!
Thanx!