{content item=page}? [solved]

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.
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

{content item=page}? [solved]

Post by Ruben_c »

I want to do some like this

{foreach item=page from=$content}
menu_name_of_the_page}">{$page->content_of_the_page}

{/foreach}

it's that posible?

I want that the div id be the same of the title of the respective page in the menu.

any suggest?
Last edited by Ruben_c on Sat Oct 09, 2010 5:27 am, edited 1 time in total.
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
NaN

Re: {content item=page}?

Post by NaN »

What is $content ?
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: {content item=page}?

Post by spcherub »

It seems like you want to do what the MenuManager is already capable of doing well. If you are familiar with the menu templates, all you need is a new template with the appropriate code. The variables are a little different from what you have listed, but an existing menu template should clue you what to do.

Another option if you don't want to use the MenuManager is to user Calguy's CGSimpleSmarty module where you can loop through a targeted set of pages and access their properties.

Let us know if you need code examples of any of the above options.

Sanjay
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: {content item=page}?

Post by Ruben_c »

The $content variable is just for example. ;D, I really don`t know what variable use to get the content of the page

I dont want a menu, I want that every page load into a div wich ID is exactly the same of the title of the menu.

With code like this:

{foreach item=page from=$content}
menu_name_of_the_page}">{$page->content_of_the_page}

{/foreach}

get some like this:


content of home
content of service
content of about us
content of contact

it`s possible?
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
uniqu3

Re: {content item=page}?

Post by uniqu3 »

Ruben i think you are thinking to complicated :-)

how is your page structred?

For example you could do this  as following:

In MenuManager you should first give your element some id for example it could look like this
url}" id="{$node->alias}">{$node->menutext}
And in your Temaplate you simply do this:


your stuff here
{content}
So what will you get with this?
If for example you have a page "Service" and alias (you can change this in "edit page -> options tab -> alia input field") and alias of this page is "service" you will get something like.

Home
Service



something, your content or whatever
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: {content item=page}?

Post by Ruben_c »

Thanks for the answers!!.

I want to load all the content of the site at once. And about the menu, I really dont care, becouse it will be like this

home

and in the body


content of home
content of service
content of about us
content of contact


just load the content at once.

Is wel explained?
???
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
uniqu3

Re: {content item=page}?

Post by uniqu3 »

Ok as i guess you want to do sort of one page layout with ajaxified effect without fall back if js is not loaded?

Well you can take a look at CGSimpleSmarty, it is capable to output content from other pages.
http://dev.cmsmadesimple.org/projects/cgsimplesmarty
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: {content item=page}?

Post by Ruben_c »

Yes, but  i want to use scroll to of jquery.

I try with cgsimplesmarty.

Thanks
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
NaN

Re: {content item=page}?

Post by NaN »

Please consider that loading all pages including their content at once will require lots of resources.
(mostly RAM)
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: {content item=page}?

Post by Ruben_c »

O yes, thanks,  but is just for a simple site with few content.
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: {content item=page}?

Post by Ruben_c »

Well, I do that:

{foreach from=$nodelist item=node}
{assign var=page value=$node->alias}

{$cgsimple->get_page_content($page,'','foo')}{eval var=$foo}

{/foreach} 

But now I have a problem with the menu.  I have

page1
page2

I want to load nothing, but go to de home page!!  :-[  I just want the menu do nothing
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
NaN

Re: {content item=page}?

Post by NaN »

What about onclick="return false;" ?
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: {content item=page}?

Post by Ruben_c »

Thanks, but don't work with onclick="return false;"  :'(
I need that index.php?page=somthing  be just index.html I change $config['url_rewriting'] = 'true'; but nothing
Last edited by Ruben_c on Fri Oct 08, 2010 4:20 am, edited 1 time in total.
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: {content item=page}?

Post by Dr.CSS »

A lot of this would be easier to help you with if we new exactly what you were trying to achieve, do you have an image of it or an example site?...

The config changes for URL rewrite are right above where you change it in a comment, what you tried is not one of the choices...
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am

Re: {content item=page}?

Post by Ruben_c »

I want to do some like this site http://www.designzoom.in/  or this http://www.solidgiant.com/ so I need that the all content of the page load at once and the menu don't send me anywhere.

I use "scroll to" of jquery, but I cant do this work using CMSMS

I get all the content, but can't fix the menu issue.

if I use $config['url_rewriting'] = 'mod_rewrite'; and html extension, nothing appear.

and without mod_rewrite,  the menu still send me to the home page even with page  :-\
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
Post Reply

Return to “CMSMS Core”