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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Get Active Content ID


Go to End


2 Posts   1252 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, 1899 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...