write a page content to udt

General project discussion. NOT for help questions.
Post Reply
olumide
Forum Members
Forum Members
Posts: 108
Joined: Mon Mar 21, 2011 10:26 am

write a page content to udt

Post by olumide »

Hi all is there a way to to write the content of a page to a udt an reproduce that page by calling the udt from another page?
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: write a page content to udt

Post by Wishbone »

Install CGSimpleSmarty and you can reference another page by:

{$cgsimple->get_page_content('the-page-alias')}
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: write a page content to udt

Post by Wishbone »

I've done this before... I have a page hierarchy, and want to show all sub-pages on a single page.

Example:

http://www.beyondhometheater.com/servic ... -theaters/

All items on the page are sub-pages. Other categories in the submenu were done the same way. I even rigged the search results to re-direct to the master page when a sub-page was found during the search. Of course this could be done with Products, ListIt, or anything else.

The entire page was generated by the menu manager with CGSimpleSmarty grabbing the content.
olumide
Forum Members
Forum Members
Posts: 108
Joined: Mon Mar 21, 2011 10:26 am

Re: write a page content to udt

Post by olumide »

Hello thanks for trying to help, i have a module which was created by ctlmodulemaker and everything works fine and when i do a search it brings up the result no problem, but then if i click on any of the items to see a detail view of the item it shows up ok no problem, if then i click on the back button or use something like this:

Code: Select all

<a href=javascript:window.location(history.go(-1))>back</a>

it does not return to my search results but to the default list before i did my search. But what i want it to do is return to my search result without me having to do the search again
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: write a page content to udt

Post by manuel »

Wow, nice site Wishbone!!
Care to share the code you used to rig the search results? (pretty please ;D )

Greetings,
Manuel
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: write a page content to udt

Post by Wishbone »

manuel wrote:Wow, nice site Wishbone!!
Care to share the code you used to rig the search results? (pretty please ;D )

Greetings,
Manuel
I don't have edit access to the site anymore to look at the exact code, but I think I can describe it.

What I did was create a template for the sub-pages, only used when accessed directly, like when clicking on a search result. Inside the template, I redirect (can't remember how) to the parent page containing all the items, and to an anchor for that item so that the search result takes you to the exact item on the master page.
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: write a page content to udt

Post by manuel »

Thx for the description!
It seems clear enough for me to be able to try and recreate it when i want to use this method!
I was puzzled because I was under the impression you where messing around with the search results template to achieve the redirect! :)

Greetings,
Manuel
Post Reply

Return to “General Discussion”