Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Get Active Content ID


Go to End
Reply


2 Posts   804 Views

Avatar
izanagi

Community Member, 2 Posts

14 February 2011 at 6:33am

Hello Community,

i am pretty new to silverstripe but googling didn't helped me to solve this problem.
I want to catch the ID of the clicked content (Database ID) in the .ss File (Article.ss).
$Title etc. is defined in the Controller and catchable.
Is there a easy way to do the same with the Content ID?

Thanks !!!

Greets

Avatar
swaiba

Forum Moderator, 1840 Posts

14 February 2011 at 6:48am

I found that a little hard to follow... but if you want the Id of the page you are viewing, or the data you are itrating over in a <% control %> you can simply put $ID in the ss template and it will be shown...