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.

Template Questions /

javascript "self.name"


Reply


3245 Views

Avatar
SalvaStripe

Community Member, 89 Posts

17 December 2008 at 4:41am

hello,

when a window was opened as popup, it has a value in self.name, otherwise (normaly browserwindow) should have no value in "self.name"..

so.. i want to display the same page normaly, with navigation, footer etc.. and as popup.
there are nearly 100 pages with a lot of text, so is would be easier to create these pages one time, not 2 times.. (editing would take double time)..

and when i create a pagetype, what loads just the content of the main site with the content, i get the problem, that the links inside this content link to "normal view site" OR "popup view site"!!

the best way would be an "IF" command.. simple JS code like

dokument.write(self.name)


does work to show the window name.. (when popup is open its value is "popup_id".. otherwise its empty.

i need to different this value in SilverStripe Code to seperate my template easy.. u know what i mean?

help me pleeasee^^ :D THX