[Radiant] Regarding the diplay of posts and stylesheets

0 views
Skip to first unread message

Bhavin Patel

unread,
Oct 11, 2009, 9:05:10 AM10/11/09
to rad...@radiantcms.org
HiI have a problem. I am new to radiant.
i have made a home page as root, articles as child and some posts as child
of articles.
I have following code in normal layout
You can check too as it is just a test : http://communiqs.com/admin and user
and pass are default still
<!DOCTYPE html> <html lang="en-us" xmlns="http://www.w3.org/1999/xhtml">
<head> <meta charset="utf-8"/> <title>Demonstration</title> <link
rel="stylesheet" href="/stylesheet" media="all" title="Default"
charset="utf-8"/> </head> <body> <r:snippet name="header">
<h1><r:title/></h1> <r:content/> </r:snippet> <r:snippet name="footer">
<r:content/> </r:snippet> <r:content/> </body> </html>

--------- and following code in home page-------
<div> <r:content part="central"/> <r:find url="/articles/">
<r:children:first order="desc" by="published_at"> <!--Display your entire
first post here--> </r:children:first> <r:children:each order="desc"
by="published_at" limit="4" offset="1"> <!--Display partial posts here (I
use a summary/excerpt page part) --> </r:children:each> </r:find> </div>
------------------------------------
*Still i am not able to see the post ? why .. what can be done?*
*as well as i have created stylesheet layout too to use with styles page in
root but even the styles are not in effect... i tried many things.. but
maybe i am missing something core....*
*plsss help me asap.*
*Thanks community.*
*
*
_______________________________________________
Radiant mailing list
Post: Rad...@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant

Nate

unread,
Oct 11, 2009, 10:03:44 AM10/11/09
to rad...@radiantcms.org
Bhavin Patel wrote:
> HiI have a problem. I am new to radiant.
> i have made a home page as root, articles as child and some posts as child
> of articles.
> I have following code in normal layout
> You can check too as it is just a test : http://communiqs.com/admin and user
> and pass are default still
> <!DOCTYPE html> <html lang="en-us" xmlns="http://www.w3.org/1999/xhtml">
> <head> <meta charset="utf-8"/> <title>Demonstration</title> <link
> rel="stylesheet" href="/stylesheet" media="all" title="Default"
> charset="utf-8"/> </head> <body> <r:snippet name="header">
> <h1><r:title/></h1> <r:content/> </r:snippet> <r:snippet name="footer">
> <r:content/> </r:snippet> <r:content/> </body> </html>
>

You are wrapping your title and content with snippet tags.

<r:snippet name="header"><h1><r:title/></h1> <r:content/> </r:snippet>

Whether you intended that or not, hat's not how snippets work. Snippets
are self-contained blocks of content, defined in the snippets area of
the admin. The snippet tags are not used to define areas of a page on
the fly.

If you wanted to set up the same page header for every page you could
make a snippet called "header" with this inside it:

<h1><r:title /></h1>
<h3><r:content part="subhead" /></h3>

Then you could place this in your layout like so:

<body>
<r:snippet name="header" />
<r:content />
<r:content part="extended" />
</body>

I hope this clears some things up for you.

~Nate

john muhl

unread,
Oct 11, 2009, 10:50:10 AM10/11/09
to rad...@radiantcms.org
On Sun, Oct 11, 2009 at 8:05 AM, Bhavin Patel <mindt...@gmail.com> wrote:
> *Still i am not able to see the post ? why .. what can be done?*

i see your posts. could you be more clear about what the issue is?

> *as well as i have created stylesheet layout too to use with styles page in
> root but even the styles are not in effect... i tried many things.. but
> maybe i am missing something core....*

your style sheets page is called "styles" but in your layout you have:


<link rel="stylesheet" href="/stylesheet" media="all" title="Default"
charset="utf-8"/>

which should be:
<link rel="stylesheet" href="/styles" media="all" title="Default"
charset="utf-8"/>

john muhl

unread,
Oct 11, 2009, 10:53:13 AM10/11/09
to rad...@radiantcms.org
On Sun, Oct 11, 2009 at 9:03 AM, Nate <pixe...@gmail.com> wrote:
> Bhavin Patel wrote:
>>
>> HiI have a problem. I am new to radiant.
>
> You are wrapping your title and content with snippet tags.
>
> <r:snippet name="header"><h1><r:title/></h1> <r:content/> </r:snippet>
>
> Whether you intended that or not, hat's not how snippets work. Snippets are
> self-contained blocks of content, defined in the snippets area of the admin.
> The snippet tags are not used to define areas of a page on the fly.

actually that is a perfectly valid way for snippets to work. for example:

page: <r:snippet name='title'><r:title/></r:snippet>
snippet: <h1><r:yield/></h1>

Nate

unread,
Oct 11, 2009, 12:28:40 PM10/11/09
to rad...@radiantcms.org
john muhl wrote:
> On Sun, Oct 11, 2009 at 9:03 AM, Nate <pixe...@gmail.com> wrote:
>
>> Bhavin Patel wrote:
>>
>>> HiI have a problem. I am new to radiant.
>>>
>> You are wrapping your title and content with snippet tags.
>>
>> <r:snippet name="header"><h1><r:title/></h1> <r:content/> </r:snippet>
>>
>> Whether you intended that or not, hat's not how snippets work. Snippets are
>> self-contained blocks of content, defined in the snippets area of the admin.
>> The snippet tags are not used to define areas of a page on the fly.
>>
>
> actually that is a perfectly valid way for snippets to work. for example:
>
> page: <r:snippet name='title'><r:title/></r:snippet>
> snippet: <h1><r:yield/></h1>

Is it really? I had no idea. Not quite sure about how to best make use
of that new information. I'll have to percolate on that a while.


~Nate

Mohit Sindhwani

unread,
Oct 11, 2009, 12:35:27 PM10/11/09
to rad...@radiantcms.org
Nate wrote:

> john muhl wrote:
>> actually that is a perfectly valid way for snippets to work. for
>> example:
>>
>> page: <r:snippet name='title'><r:title/></r:snippet>
>> snippet: <h1><r:yield/></h1>
>
> Is it really? I had no idea. Not quite sure about how to best make use
> of that new information. I'll have to percolate on that a while.
>
I agree - that sounds powerful... now to find a way to use it :)

Cheers,
Mohit.
10/12/2009 | 12:35 AM.

Reply all
Reply to author
Forward
0 new messages