How to Numbering block
Permalink
how can we numbering block appear on left side page?
if there is 5 block appear in left side, how can we numbering it from 1 to 5, top to bottom?,
i think there is position atribut, but i cannot find it, the param..
thank you.
if there is 5 block appear in left side, how can we numbering it from 1 to 5, top to bottom?,
i think there is position atribut, but i cannot find it, the param..
thank you.
or you can make a block that makes areas ;)
Care to be a little more... descriptive? :)
How does one go about that?
How does one go about that?
hii.. thanks all, sory for this late reply.
i think if c5 use loop for load block, its posible,
but i dont know where the loop is, another solution is using position atribut, but again, i dont know how to access this position attribut..
yups!, cry with lack of my skill :)
i think if c5 use loop for load block, its posible,
but i dont know where the loop is, another solution is using position atribut, but again, i dont know how to access this position attribut..
yups!, cry with lack of my skill :)
You are correct that there is a loop somewhere, but the problem is that the loop is buried inside the concrete5 system and not very easy to get to.
So... there is a way to do this but it's kind of a hack. It will work but it might break the next time you update your Concrete5 system (it may not though -- depends on what exactly is updated).
I'm attaching an example of how to do this. Download the attached file, unzip it, and place it in your site's "models" directory (NOT in "concrete/models").
Then in your template, where you usually have this code:
use this code instead:
Note that this will only work with the latest version of concrete5 (version 5.4.1.1) -- if you're using an older version of concrete5 let me know and I can post an older version of this file (but again, it will break if/when you upgrade your system).
If you want some more explanation for how this works, let me know and I'd be happy to go into some detail.
-Jordan
So... there is a way to do this but it's kind of a hack. It will work but it might break the next time you update your Concrete5 system (it may not though -- depends on what exactly is updated).
I'm attaching an example of how to do this. Download the attached file, unzip it, and place it in your site's "models" directory (NOT in "concrete/models").
Then in your template, where you usually have this code:
<?php $a = new Area('Sidebar'); $a->display($c); ?>
use this code instead:
<?php Loader::model('numbered_area'); $a = new NumberedArea('Sidebar'); $a->display($c); ?>
Note that this will only work with the latest version of concrete5 (version 5.4.1.1) -- if you're using an older version of concrete5 let me know and I can post an older version of this file (but again, it will break if/when you upgrade your system).
If you want some more explanation for how this works, let me know and I'd be happy to go into some detail.
-Jordan
thanks for the script, i will try it.
you are the man.. :)
you are the man.. :)
jordanlev, with blocks, you can create more areas, its how the area splitter block works,
So you just add the "$a = new Area('Main'); $a->display($c);" code to the block view? That's pretty cool!
I'm not sure this would help with the OP's specific problem, though. You'd still have to hack the area output code to get the numbers in there.
I'm not sure this would help with the OP's specific problem, though. You'd still have to hack the area output code to get the numbers in there.
yea basically that, except that no area's can have the same name, so Bid then numbers, wouldn't be too hard
Thank's Mnkras!
Thank's jordanlev!
it's SOLVED :)
Thank's jordanlev!
it's SOLVED :)
If you only want to do this in 1 or 2 places in your site, you might be better off just adding little content blocks that show the number in between the other blocks.
Otherwise, I think you'd have to hack the core code in the area model to make this work (which probably isn't worth the trouble unless this is a critical feature).