Hello,
I know that I assign names to chunks - and that MODx applies numbers to the end of each chunk I create.
Is there such a thing as [+chunk.id+] or the equivalent?
I would like to use that chunk number that MODx applies as an ID in the rel= call of a link.
Eg:
rel="lightbox[[+chunk.id+]]"
That doesn’t seem to work for me though so I am presuming that is not the correct placeholder.
The chunks I am wanting to reference are number 90, 91, 92
What I am wanting in my rel tags is:
rel="lightbox[90]"
rel="lightbox[91]"
etc
[+chunk.name+] or the equivalent would also be ok as they are unique too.
Thanks in advance.
You can easily create your own code. Have a look at the modx_site_tmplvars table.
Something like this might work
$result = $modx->db->query( ’SELECT id FROM `modx_site_tmplvars` WHERE name=`NAME OF YOUR TV`’);
Hello cipa,
Sorry - I am not a coder - and don’t understand what you said.
I am also talking about chunks - not TV’s.
Thanks though.
Anyone else?
Sorry about that
Just replace modx_site_tmplvars with modx_site_htmlsnippets.
BTW do you need you for Ditto, Maxigallery or something else?
thanks cipa - I am using it for autogallery.
I have no idea how to use this or where to put it though:
$result = $modx->db->query( ’SELECT id FROM `modx_site_htmlsnippets` WHERE name=`NAME OF YOUR TV`’);