echoing menu name

13 posts by 4 authors in: Forums > CMS Builder
Last Post: August 1, 2011   (RSS)

Hello all,

Long time learner, first time poster.

Basically, I was wondering if there was any way to echo the section name field on a webpage. That is, echo the "section name" field as it appears on the "general" tab in the section editor.

Hope that made sense!

Re: [buttermilk] echoing menu name

By Jason - March 23, 2011

Hi,

Currently, the section label isn't a variable that can be accessed in code. If you can give an example of what you're trying to accomplish, we may be able to suggest a different solution.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] echoing menu name

By Tim_cmsb - July 28, 2011

Hi Jason,

I would also like to know how this can be done!!!!
I'm using popups that display video using a script in a field for each record (field name of all records is "code_di_video"), but now I merged all the records and have the problem to display them.
See a merged version of the idea here: http://www.vigilantekorsou.com/columns_of_videos_of_multiple_tables.php
If you click on the play buttons it will not work, because I'm using the following link as example:

<a href="video_pop_up_template-<?php echo $recordMerge['sectionName'] ?>.php?<?php echo $recordMerge['_filename'] ?>-<?php echo $recordMerge['num'] ?>">link</a>

Here is a working version, but here I'm using 1 record only: http://www.vigilantekorsou.com/videocolumns.php
Here the play buttons go to: http://www.vigilantekorsou.com/video_pop_up_template-video.php
Throughout the site I named the popups in the following way: video_pop_up_template-"sectionName".php and works fine when not merged.

Here is a another version, but is displaying all the videos merged again: http://www.vigilantekorsou.com/columns_of_videos_of_multiple_tables2.php
I created a http://www.vigilantekorsou.com/video_pop_up_template-general.php page to try to display the videos I want, but I want to know how to create maybe a searchresult idea...??? And then maybe I can get the video to work as a result...!!!

Please need some help with this!

Regards,

Tim

Re: [Tim_cmsb] echoing menu name

By Jason - July 28, 2011

Hi Tim,

Could you please attach columns_of_videos_of_multiple_tables.php to this thread so that I can see the actual code you're using?

thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] echoing menu name

By Tim_cmsb - July 28, 2011

Hi Jason,

Here is the attachment...!

Regards,

Tim

Re: [Jason] echoing menu name

By Tim_cmsb - July 28, 2011

I didn't press upload before posting reply...
Here you go...

Re: [Tim_cmsb] echoing menu name

By Jason - July 28, 2011

Hi Tim,

One option would be to not use array_merge, and instead loop through each record set one at a time. This way you could create a sectionName field manually as you go.

For example:

foreach ($polisialRecords as $record) {
$record['sectionName'] = 'polisial';
@$TimMerge[] = $record;
}


Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] echoing menu name

By Tim_cmsb - July 28, 2011

Jason,

This is for each record, but can the videos of all the sections I want to merge get their own link.
I don't get it!!!

Tim

Re: [Tim_cmsb] echoing menu name

By Tim_cmsb - July 28, 2011

Jason,

How do I Use what you sent me?
I tried this at the top:

<!-- Creating sectionNames -->

foreach ($polisialRecords as $record) {
$record['sectionName'] = 'polisial';
@$TimMerge[] = $record;
}

foreach ($politikaRecords as $record) {
$record['sectionName'] = 'politika';
@$TimMerge[] = $record;
}

foreach ($hustisiaRecords as $record) {
$record['sectionName'] = 'hustisia';
@$TimMerge[] = $record;
}

foreach ($lokalRecords as $record) {
$record['sectionName'] = 'lokal';
@$TimMerge[] = $record;
}

foreach ($internashonalRecords as $record) {
$record['sectionName'] = 'internashonal';
@$TimMerge[] = $record;
}

foreach ($arubaRecords as $record) {
$record['sectionName'] = 'aruba';
@$TimMerge[] = $record;
}

foreach ($st_martinRecords as $record) {
$record['sectionName'] = 'st_martin';
@$TimMerge[] = $record;
}

foreach ($sosialRecords as $record) {
$record['sectionName'] = 'sosial';
@$TimMerge[] = $record;
}

foreach ($farandulaRecords as $record) {
$record['sectionName'] = 'farandula';
@$TimMerge[] = $record;
}

foreach ($deporte_nashonalRecords as $record) {
$record['sectionName'] = 'deporte_nashonal';
@$TimMerge[] = $record;
}

foreach ($deporte_internashonalRecords as $record) {
$record['sectionName'] = 'deporte_internashonal';
@$TimMerge[] = $record;
}

foreach ($titularnanRecords as $record) {
$record['sectionName'] = 'titularnan';
@$TimMerge[] = $record;
}

foreach ($notisia_di_ultimo_oraRecords as $record) {
$record['sectionName'] = 'notisia_di_ultimo_ora';
@$TimMerge[] = $record;
}

<!-- /Creating sectionNames -->

I'm no very good at this.

Tim