How can I display different content on 1 page or Create a Frame?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
forextrader36
Forum Members
Forum Members
Posts: 82
Joined: Mon Jul 09, 2007 6:17 pm

How can I display different content on 1 page or Create a Frame?

Post by forextrader36 »

I have lots of content that I would like to display but I would like to avoid creating a new page for each piece of content otherwise eventually I will end up with hundreds of pages.

For example:

I would like the main page to consist of a list of links to the required content,

Content 1
Content 2
Content 3
Content 4
Content 5


When one of the links is selected I would like to display the relevant content on the same page.

Can anybody advise me on the best method to achieve this?
Last edited by forextrader36 on Sat Aug 04, 2007 5:39 pm, edited 1 time in total.
Pierre M.

Re: How can I display different content on 1 page?

Post by Pierre M. »

Hello,

just install with the sample demo content. Then, go to "How CMSMS Works" and "Content". You will see :
A page can have one or several content areas, or content blocks The first must be {content}. To add more content blocks to your template, use {content block='block name'}. These blocks will then appear as textareas when you edit a page.
Pierre M.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: How can I display different content on 1 page?

Post by RonnyK »

There is GCB (Global Content Block), where you can enter a GCB and the code included. By calling the {GCB} inside a page/template, you have the same code on different pages, where you only have to maintain it on a single place.

Ther is a module "Content Aliases" to call pages on different places, where only one is maintained.

http://dev.cmsmadesimple.org/projects/contentaliases

If on multiple pages the same text has to appear, you might consider "GCB" and embed them in the template.

Ronny
forextrader36
Forum Members
Forum Members
Posts: 82
Joined: Mon Jul 09, 2007 6:17 pm

Re: How can I display different content on 1 page?

Post by forextrader36 »

Maybe my explanation wasn't very clear.

What I want is a set of links, but rather than the link opening up a new page it displays on the current page.

I believe usually I would use a 'Frame' but wondered what the best method would be in CMS Made Simple.
forextrader36
Forum Members
Forum Members
Posts: 82
Joined: Mon Jul 09, 2007 6:17 pm

Re: How can I display different content on 1 page? (Create a Frame)

Post by forextrader36 »

I have just noticed when creating a link there is an option to select "Target Frame"

Therefore, my next question is How do I create a frame?
Last edited by forextrader36 on Tue Jul 31, 2007 8:31 pm, edited 1 time in total.
Pierre M.

Re: How can I display different content on 1 page?

Post by Pierre M. »

Hello again,
forextrader36 wrote: What I want is a set of links, but rather than the link opening up a new page it displays on the current page.
Something like the "detailpage" option in the News module ?
If I understand well, you want one page to have several alternative contents. IMHO this is not how the web works. A web site is a mapping between URLs and content. When the content changes, bots (and bookmarks) get confused and your pagerank falls.

I'd rather several pages (each dedicated to one content) sharing a template. The links could be provided by a {menu} tag with optional attributes (startelement...)
I believe usually I would use a 'Frame' but wondered what the best method would be in CMS Made Simple.
Beware frames were an ugly hack of the last century. Not bots friendly either. Not user friendly either (clic "back"). Disclaimer : I'm antiframes.

Pierre M.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: How can I display different content on 1 page? (Create a Frame)

Post by RonnyK »

What about using {pi_iframe} or {embed} to open the links in the content-area. With these two tags, you can link EXTERNAL pages, to open within the page. The links will show in the menu/sitemap/list, but the page will open within CMSMS.

Ronny
SimonSchaufi

Re: How can I display different content on 1 page? (Create a Frame)

Post by SimonSchaufi »

Do you mean displaying external pages in a frame or the ones from CMS? I would also know how this works to display pages inside a frame
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: How can I display different content on 1 page? (Create a Frame)

Post by RonnyK »

Internal pages can be linked using the "CMS link", the palmtree in the editors.

I meant External pages, where the URL is the parameter inside the tag. The page will then open in the content-area of the template, just as regular content.

Ronny
forextrader36
Forum Members
Forum Members
Posts: 82
Joined: Mon Jul 09, 2007 6:17 pm

Re: How can I display different content on 1 page or Create a Frame?

Post by forextrader36 »

The content I want to display is neither an external page or an internal CMSMS page, let me explain further:

I am going to add new content everyday but would like to keep each days content seperate, obviously I could create a new page with each days content on but after 2 years I would have over 700 pages.

Ideally I am trying to avoid creating a new page for each days content as it would be difficult to manage after a while.

Can anybody suggest any possible solutions?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How can I display different content on 1 page or Create a Frame?

Post by Dr.CSS »

You can use the news module for this and make a special news template to drive the look with the browsecat=1 tag which will show the list of categories with how many items in the category then that links to the category with all the articles shown clicking on the article will show it only with a back button to view the rest of them...
Pierre M.

Re: How can I display different content on 1 page or Create a Frame?

Post by Pierre M. »

Hello again,

I have another opinion ;)
You want to add a new page each day, so you will have more than 700 pages after two years.
I'm not sure there won't be PHP memory constraints with the News module under such a volume.

I'd rather stand with pages, may be with a time hierarchy :
*2007
**week 1 (or month)
***day 1
***day 2
***day n
With such pagenames/aliases you end up with a scalable site easily crawlable and ranked :
/2007/01/01-sometext.html
/2007/01/02-othertext.html
/2007/12/31-textagain.html
/2008/01/01-happyNY.html
etc.

As I have written above, twiking {menu} tags (startelement...) you can list links of a subhierarchy anywhere you want.

Pierre M.
streever

Re: How can I display different content on 1 page or Create a Frame?

Post by streever »

It sounds like you want to make a blog.

To be honest, what you are describing sounds overly complicated:
Let's break it down a little.

Frames:
OK, so Frames are really bad technology to begin with--I mean awful--you want to never use a frame. I won't really go into why frames are bad, it's something that isn't open to discussion for me ;-). The problem with a frame is you aren't saving on any pages. You still have one page each time... a frame CALLS a PAGE into it, do you know how I mean? So you have a template page (framewrapper.html) which calls in other pages--(frameheader.html, framenavigation.html, and then "namedcontent.html").

OK--so you have ONE page (as a template) which has to call in AT LEAST 2 pages per page of content. One is the structure, and the other is that content.

So you triple the number of pages per page of content.

Because this is a CMS, you really want just to have seperate pages. But, you have ONE page template, with a little snippet to call in the content.

It's much easier. If you use a good, simple, clean CSS design, it will be cached in the visitor's browser. There won't be any flicker, the new content will load cleanly as if it were in a frame.

Maybe you can post a sample showing what you are doing, and a sample of the type of content. I think you may have to evaluate what you want to do.

I hope that is helpful, and that we can all help you find a good solution.
Post Reply

Return to “CMSMS Core”