|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
different layout for different renderingsHi,
I'm using radiant for the Profoss website ( http://www.profoss.eu ). Profoss organises events, and each event has its own news section. This news section is displayed in a tab (widget from extjs.com), eg http://www.profoss.eu/events?tab=news If you visit this link, you'll see that the page is rendered as pure html, so the layout is simply <r:content />. Although the page is displayed in a tab, I also would like to make it available at http://www.profoss.eu/events/october-2007-asterisk/news The problem is that the page there is also rendered with a simple layout. Is there a way to configure the layout used according to a parameter passed in the url? That way I would pass something like "?embedded=true" when requesting the page for the tab content, but the full layout would be used when accessing the URL without this parameter. Or is there an even better solution? thanks Raph -- Web database: http://www.myowndb.com Free Software Developers Meeting: http://www.fosdem.org _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: different layout for different renderings As i understand, when the news page is rendered inside a tab it's
retrieved dynamically with AJAX and added to the DOM. Then you want to show the same page with layout when is accessed directly by the user. AFIK this is not possible with Radiant as it's now. This looks like the task for an extension. Take a look to existing extension, may be there is one that allows you to do this. /AITOR On 8/22/07, Raphael Bauduin <rblists@...> wrote: > > Hi, > > I'm using radiant for the Profoss website ( http://www.profoss.eu ). > Profoss organises events, and each event has its own news section. > This news section is displayed in a tab (widget from extjs.com), eg > http://www.profoss.eu/events?tab=news > > If you visit this link, you'll see that the page is rendered as pure > html, so the layout is simply <r:content />. > > Although the page is displayed in a tab, I also would like to make it > available at http://www.profoss.eu/events/october-2007-asterisk/news > The problem is that the page there is also rendered with a simple layout. > > Is there a way to configure the layout used according to a parameter > passed in the url? That way I would pass something like > "?embedded=true" when requesting the page for the tab content, but the > full layout would be used when accessing the URL without this > parameter. > > Or is there an even better solution? > > thanks > > Raph > -- > Web database: http://www.myowndb.com > Free Software Developers Meeting: http://www.fosdem.org > _______________________________________________ > Radiant mailing list > Post: Radiant@... > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: different layout for different renderingsAssuming Aitor is right and AJAX is being used to fetch the page,
could you simply apply the layout all the time, use AJAX to fetch the page, but only add to the DOM from a certain element (ie: place everything important inside <div id="important"> and then only copy its children from the AJAX response into the current DOM)? This should be a fairly simple Javascript solution that won't require any Radiant/Rails hacking... On Aug 22, 2007, at 9:08 AM, Aitor Garay-Romero wrote: > As i understand, when the news page is rendered inside a tab it's > retrieved dynamically with AJAX and added to the DOM. Then you > want to show > the same page with layout when is accessed directly by the user. > > AFIK this is not possible with Radiant as it's now. This looks > like the > task for an extension. Take a look to existing extension, may be > there is > one that allows you to do this. > > /AITOR > > On 8/22/07, Raphael Bauduin <rblists@...> wrote: >> >> Hi, >> >> I'm using radiant for the Profoss website ( http://www.profoss.eu ). >> Profoss organises events, and each event has its own news section. >> This news section is displayed in a tab (widget from extjs.com), eg >> http://www.profoss.eu/events?tab=news >> >> If you visit this link, you'll see that the page is rendered as pure >> html, so the layout is simply <r:content />. >> >> Although the page is displayed in a tab, I also would like to make it >> available at http://www.profoss.eu/events/october-2007-asterisk/news >> The problem is that the page there is also rendered with a simple >> layout. >> >> Is there a way to configure the layout used according to a parameter >> passed in the url? That way I would pass something like >> "?embedded=true" when requesting the page for the tab content, but >> the >> full layout would be used when accessing the URL without this >> parameter. >> >> Or is there an even better solution? >> >> thanks >> >> Raph >> -- >> Web database: http://www.myowndb.com >> Free Software Developers Meeting: http://www.fosdem.org >> _______________________________________________ >> Radiant mailing list >> Post: Radiant@... >> Search: http://radiantcms.org/mailing-list/search/ >> Site: http://lists.radiantcms.org/mailman/listinfo/radiant >> > _______________________________________________ > Radiant mailing list > Post: Radiant@... > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: different layout for different renderingsYou should be able to do this with a page type. The page type can get
the paremeter, then add a conditional tag to test for it. I actually may need this, if it works, I will let you know. Keith Bingman keith@... http://keithbingman.com On Aug 22, 2007, at 3:08 PM, Aitor Garay-Romero wrote: > As i understand, when the news page is rendered inside a tab it's > retrieved dynamically with AJAX and added to the DOM. Then you > want to show > the same page with layout when is accessed directly by the user. > > AFIK this is not possible with Radiant as it's now. This looks > like the > task for an extension. Take a look to existing extension, may be > there is > one that allows you to do this. > > /AITOR > > On 8/22/07, Raphael Bauduin <rblists@...> wrote: >> >> Hi, >> >> I'm using radiant for the Profoss website ( http://www.profoss.eu ). >> Profoss organises events, and each event has its own news section. >> This news section is displayed in a tab (widget from extjs.com), eg >> http://www.profoss.eu/events?tab=news >> >> If you visit this link, you'll see that the page is rendered as pure >> html, so the layout is simply <r:content />. >> >> Although the page is displayed in a tab, I also would like to make it >> available at http://www.profoss.eu/events/october-2007-asterisk/news >> The problem is that the page there is also rendered with a simple >> layout. >> >> Is there a way to configure the layout used according to a parameter >> passed in the url? That way I would pass something like >> "?embedded=true" when requesting the page for the tab content, but >> the >> full layout would be used when accessing the URL without this >> parameter. >> >> Or is there an even better solution? >> >> thanks >> >> Raph >> -- _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: different layout for different renderings Good idea!
/AITOR On 8/22/07, Andrew Bloom <andrew@...> wrote: > > Assuming Aitor is right and AJAX is being used to fetch the page, > could you simply apply the layout all the time, use AJAX to fetch the > page, but only add to the DOM from a certain element (ie: place > everything important inside <div id="important"> and then only copy > its children from the AJAX response into the current DOM)? This > should be a fairly simple Javascript solution that won't require any > Radiant/Rails hacking... > > On Aug 22, 2007, at 9:08 AM, Aitor Garay-Romero wrote: > > > As i understand, when the news page is rendered inside a tab it's > > retrieved dynamically with AJAX and added to the DOM. Then you > > want to show > > the same page with layout when is accessed directly by the user. > > > > AFIK this is not possible with Radiant as it's now. This looks > > like the > > task for an extension. Take a look to existing extension, may be > > there is > > one that allows you to do this. > > > > /AITOR > > > > On 8/22/07, Raphael Bauduin <rblists@...> wrote: > >> > >> Hi, > >> > >> I'm using radiant for the Profoss website ( http://www.profoss.eu ). > >> Profoss organises events, and each event has its own news section. > >> This news section is displayed in a tab (widget from extjs.com), eg > >> http://www.profoss.eu/events?tab=news > >> > >> If you visit this link, you'll see that the page is rendered as pure > >> html, so the layout is simply <r:content />. > >> > >> Although the page is displayed in a tab, I also would like to make it > >> available at http://www.profoss.eu/events/october-2007-asterisk/news > >> The problem is that the page there is also rendered with a simple > >> layout. > >> > >> Is there a way to configure the layout used according to a parameter > >> passed in the url? That way I would pass something like > >> "?embedded=true" when requesting the page for the tab content, but > >> the > >> full layout would be used when accessing the URL without this > >> parameter. > >> > >> Or is there an even better solution? > >> > >> thanks > >> > >> Raph > >> -- > >> Web database: http://www.myowndb.com > >> Free Software Developers Meeting: http://www.fosdem.org > >> _______________________________________________ > >> Radiant mailing list > >> Post: Radiant@... > >> Search: http://radiantcms.org/mailing-list/search/ > >> Site: http://lists.radiantcms.org/mailman/listinfo/radiant > >> > > _______________________________________________ > > Radiant mailing list > > Post: Radiant@... > > Search: http://radiantcms.org/mailing-list/search/ > > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > > _______________________________________________ > Radiant mailing list > Post: Radiant@... > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
|
|
Re: different layout for different renderingsYou just made my day. I have been hacking around for weeks on this. I
never could see anything that was just sitting in front of me! Thanks! Keith Bingman keith@... http://keithbingman.com On Aug 22, 2007, at 3:23 PM, Andrew Bloom wrote: > Assuming Aitor is right and AJAX is being used to fetch the page, > could you simply apply the layout all the time, use AJAX to fetch the > page, but only add to the DOM from a certain element (ie: place > everything important inside <div id="important"> and then only copy > its children from the AJAX response into the current DOM)? This > should be a fairly simple Javascript solution that won't require any > Radiant/Rails hacking... > _______________________________________________ Radiant mailing list Post: Radiant@... Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant |
| Free embeddable forum powered by Nabble | Forum Help |