Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Section Title as a Link

 

 


Perchpole
User

Mar 11, 2008, 9:22 AM

Post #1 of 5 (436 views)
Shortcut
Section Title as a Link Can't Post

Hello All (and Dave!)

I'm trying to work out how to pull the data from the database that will allow me create a link to the parent list page of a section.

Dave very kindly provided me with this code in an earlier post:


Code
 <?php   $schema = loadSchema($options['tableName']);   print $schema['menuName']; ?> 



This creates the section title. What I need to do now is wrap this in an HREF tag so that it links to the relevant section list page, i.e.:


Code
 <a href="XYZ"><?php   $schema = loadSchema($options['tableName']);   print $schema['menuName']; ?></a> 



I've tried lots of different code combinations but I just can't work it out!

Any advice would be most welcome

Unimpressed

AJ


Dave
Staff / Moderator


Mar 11, 2008, 10:48 AM

Post #2 of 5 (433 views)
Shortcut
Re: [Perchpole] Section Title as a Link [In reply to] Can't Post

Are you trying to create a menu or just be able to link from the detail page back to the record list?

The url to your list page isn't stored anywhere, but there's a few ways to do this. Here's some:

- The simplest being the javascript:history.back(1)

- If you follow a naming convention and always have your list pages named /somedir/index.php and your detail pages named something in that directory you could have your link to "./" to go to the directory root. So you'd have /jobs/ (the index) and /jobs/detail.php?3 which would link back to the index.

- Another way is to create a whole new section for you menu or links. I'll often create a single page section called "Misc Content" with little text snippets used on the site. I'll load it on every page (into $misc instead of $record) and then link to content like this: <?php echo $miscContent['jobIndexLink']; ?>

Would any of those help? Or do we need something else?

Dave Edis - Senior Developer
interactivetools.com


Perchpole
User

Mar 11, 2008, 12:02 PM

Post #3 of 5 (427 views)
Shortcut
Re: [Dave] Section Title as a Link [In reply to] Can't Post

 
Hi, Dave -

Thanks for your response. As with other posts, I'm trying to find the simplest way to put together a series of templates which use generic code to populate the links and references to other pages. You can do this in AM but it seems a bit harder CMS.

One of the sites I'm building has a lot of different categories. I've configured a range of list pages for each category (designed to display the same data in different ways) which are called-up at various points around the site. Some (cut down) lists appear in the margins of other list pages (via php includes). In all cases it would be nice to use a generic link on each list to allow visitors to jump back to the index page at the top of the category.

Again, I'd like to do this with code drawn from the database. The only alternative is that I will have to edit the link for each template - which (IMHO) defeats the purpose of this software!

I appreciate I could use something along the lines of:


Code
 ./category_folder/index.php 



...but how would I call the "category_folder" - without adding it manually to every template?

:)

AJ


Dave
Staff / Moderator


Mar 11, 2008, 12:38 PM

Post #4 of 5 (423 views)
Shortcut
Re: [Perchpole] Section Title as a Link [In reply to] Can't Post

Is there an url you could post with html mockups or work in progress to give a better idea of how it's all setup right now?

Dave Edis - Senior Developer
interactivetools.com


Perchpole
User

Mar 11, 2008, 12:57 PM

Post #5 of 5 (422 views)
Shortcut
Re: [Dave] Section Title as a Link [In reply to] Can't Post

Hi, Dave -

Yes, take a look here...

http://www.mms-models.co.uk/

This particular problem concerns the lists in the right-hand margin. As you'll see, each sub list shows the last 3 products (added to each category). Directly above each list is the category name. I would like to use these titles (Classic Series, Accessory Pak) to link back to that specific category.

Yes, I could hard-code the links but it defeats the object! Besides a working example of how this could be achieved would be useful for other instances around this and other sites.

:)

AJ

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4