#1
Posted 03 October 2012 - 08:55 PM
I was looking at the source code of the site I'm working on. I had duplicated a box section so I could have two sets of boxes on the home page. Well, it looks like when you duplicate a section, the ID gets duplicated too, so now I have two places in my code that say:
section id="boxes"
IDs are supposed to be unique on a page. How can I fix this?
#2
Posted 03 October 2012 - 09:22 PM
#3
Posted 03 October 2012 - 09:47 PM
Is there some way to request that this feature be implemented in the next version?
In regular old WordPress, every time you add a widget, it gets a unique ID automatically - WP just appends a number to the base ID name. And when you clone a section, it even names the sets "Boxes #2", Boxes #3" or something like that. So the information to make this possible seems to be in the system somewhere...
#4
Posted 03 October 2012 - 10:08 PM
#5
Posted 03 October 2012 - 10:10 PM
#6
Posted 03 October 2012 - 10:14 PM
(These instructions still good?)
#7
Posted 03 October 2012 - 10:16 PM
Yes basically, copy the section folder into your child themes sections folder, then open the section.php and change the classname and the name of the section.
#8
Posted 03 October 2012 - 10:22 PM
#9
Posted 04 October 2012 - 02:21 AM
#10
Posted 04 October 2012 - 06:58 PM
#11
Posted 04 October 2012 - 10:24 PM
#12
Posted 05 October 2012 - 01:36 AM
#13
Posted 05 October 2012 - 10:53 PM
This is what I have so far. What am I doing wrong?
<?php
/*
Section: HighlightClone
Author: PageLines and KJF
Author URI:
Description: Adds a highlight sections with a splash image and 2-big lines of text.
Class Name: PageLinesHighlightClone
Workswith: templates, main, header, morefoot, sidebar1, sidebar2, sidebar_wrap
Edition: pro
Cloning: true
*/
/**
* Highlight Section
*
* @package PageLines Framework
* @author PageLines
*/
class PageLinesHighlightClone extends PageLinesSection {
var $tabcloneID = 'highlight_meta';
/**
*
* @TODO document
*
*/
function section_optionator( $settingsclone ){
$settingsclone = wp_parse_args($settingsclone, $this->optionator_default);
$metatabclone_array = array(
'hl_options' => array(
'version' => 'pro',
'type' => 'multi_option',
'title' => 'Highlight Header Text (Optional)',
'shortexp' => 'Add the main header text for the highlight section.',
'selectvalues' => array(
'_highlight_head' => array(
'version' => 'pro',
'type' => 'text',
'size' => 'big',
'inputlabel' => 'Highlight Header Text (Optional)',
),
'_highlight_subhead' => array(
'version' => 'pro',
'type' => 'text',
'size' => 'big',
'inputlabel' => 'Highlight Subheader Text (Optional)',
),
'_highlight_splash' => array(
'version' => 'pro',
'type' => 'image_upload',
'inputlabel' => 'Upload Splash Image'
),
'_highlight_splash_position' => array(
'version' => 'pro',
'type' => 'select',
'inputlabel' => 'Highlight Image Style',
'selectvalues'=> array(
'top' => array( 'name' => 'Image on top of text' ),
'bottom' => array( 'name' => 'Image on bottom of text' ),
'notext' => array( 'name' => 'No text, just the image' )
),
),
'_highlight_image_frame' => array(
'type' => 'check',
'inputlabel' => 'Add frame to image?'
),
)
)
);
$metatabclone_settingsclone = array(
'id' => $this->tabcloneID+"1",
'name' => 'Highlight Clone',
'icon' => $this->icon,
'clone_id' => $settingsclone['clone_id']+"1",
'active' => $settingsclone['active']
);
register_metatab($metatabclone_settingsclone, $metatabclone_array);
}
/**
*
* @TODO document
*
*/
function section_template( $clone_id ) {
$h_headclone = ploption('_highlight_head', $this->tset);
$h_subheadclone = ploption('_highlight_subhead', $this->tset);
$h_splashclone = ploption('_highlight_splash', $this->tset);
$h_splash_positionclone = ploption('_highlight_splash_position', $this->oset);
$frame_classclone = (ploption('_highlight_image_frame', $this->oset)) ? 'pl-imageframe' : '';
if($h_headclone || $h_subheadclone || $h_splashclone){?>
<div class="highlight-area">
<?php
if( $h_splash_positionclone == 'top' && $h_splashclone)
printf('<div class="highlight-splash hl-image-top %s"><img src="%s" alt="" /></div>', $frame_classclone, $h_splashclone);
if( $h_splash_positionclone != 'notext' ){
if($h_headclone)
printf('<h1 class="highlight-head">%s</h1>', __( $h_headclone, 'pagelines' ) );
if($h_subheadclone)
printf('<h3 class="highlight-subhead subhead">%s</h3>', __( $h_subheadclone, 'pagelines' ) [color=blue][font=monospace][size=3])[/size][/font][/color][color=blue][font=monospace][size=3];[/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=blue][font=monospace][size=3]} [/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=#770088][font=monospace][size=3]if[/size][/font][/color][color=blue][font=monospace][size=3]( [/size][/font][/color][color=black][font=monospace][size=3]$h_splash_positionclone [/size][/font][/color][color=blue][font=monospace][size=3]!= [/size][/font][/color][color=#AA2222][font=monospace][size=3]'top' [/size][/font][/color][color=blue][font=monospace][size=3]&& [/size][/font][/color][color=black][font=monospace][size=3]$h_splashclone[/size][/font][/color][color=blue][font=monospace][size=3])[/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=green][font=monospace][size=3]printf[/size][/font][/color][color=blue][font=monospace][size=3]([/size][/font][/color][color=#AA2222][font=monospace][size=3]'<div class="highlight-splash hl-image-bottom %s"><img src="%s" alt="" /></div>'[/size][/font][/color][color=blue][font=monospace][size=3], [/size][/font][/color][color=black][font=monospace][size=3]$frame_classclone[/size][/font][/color][color=blue][font=monospace][size=3], [/size][/font][/color][color=black][font=monospace][size=3]apply_filters[/size][/font][/color][color=blue][font=monospace][size=3]( [/size][/font][/color][color=#AA2222][font=monospace][size=3]'pl_highlight_splash'[/size][/font][/color][color=blue][font=monospace][size=3], [/size][/font][/color][color=black][font=monospace][size=3]$h_splashclone [/size][/font][/color][color=blue][font=monospace][size=3]) [/size][/font][/color][color=blue][font=monospace][size=3])[/size][/font][/color][color=blue][font=monospace][size=3];[/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=#999999][font=monospace][size=3]?> [/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=black][font=monospace][size=3]</[/size][/font][/color][color=#AA00BB][font=monospace][size=3]div[/size][/font][/color][color=black][font=monospace][size=3]>[/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=#999999][font=monospace][size=3]<?php [/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=blue][font=monospace][size=3]} [/size][/font][/color][color=#770088][font=monospace][size=3]else[/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=green][font=monospace][size=3]echo [/size][/font][/color][color=black][font=monospace][size=3]setup_section_notify[/size][/font][/color][color=blue][font=monospace][size=3]([/size][/font][/color][color=#770088][font=monospace][size=3]$this[/size][/font][/color][color=blue][font=monospace][size=3], [/size][/font][/color][color=black][font=monospace][size=3]__[/size][/font][/color][color=blue][font=monospace][size=3]([/size][/font][/color][color=#AA2222][font=monospace][size=3]'Set highlight page options to activate.'[/size][/font][/color][color=blue][font=monospace][size=3], [/size][/font][/color][color=#AA2222][font=monospace][size=3]'pagelines'[/size][/font][/color][color=blue][font=monospace][size=3]) [/size][/font][/color][color=blue][font=monospace][size=3])[/size][/font][/color][color=blue][font=monospace][size=3];[/size][/font][/color]
[color=#FF0000][font=monospace][size=3] [/size][/font][/color][color=blue][font=monospace][size=3]}[/size][/font][/color]
[color=blue][font=monospace][size=3]}[/size][/font][/color]
#14
Posted 06 October 2012 - 07:52 PM
Unfortunately we don't read and analyze code here.
If you're trying to add multiple instances of boxes on a page or post, the solution is really quite simple. Use
This plugin uses shortcodes and has made a new section called Content Blocks, which are the same, essentially, as boxes. Thus there's never any conflict with boxes provided by the theme you're using.
It's relatively simple to use, very similar to Boxes in that you create a set, and apply your box (content block) to the set. The fundamental difference is just adding a shortcode where you want it on your site, even in sidebars.
#15
Posted 07 October 2012 - 06:54 AM
Forgive my impatience... but we are PAYING for PageLines. As wonderful as it is, I remain frustrated that it shipped with a feature that generates incorrect HTML. I'd really appreciate some help here.
#16
Posted 07 October 2012 - 09:40 AM
You posted at 8am on a sunday morning, so please bear with us. In the mean time, as I already suggested, until i try and fix it if validation is a deal breaker, dont use the clones, they were added as a quick/cheap/easy way of duplicating sections.
#17
Posted 08 October 2012 - 04:03 AM
#18
Posted 08 October 2012 - 10:01 AM
For example, I used the following code on 3 Highlight section clones:
This is what I ended up with:
The top Highlight is the default styling, the others are styled with the code above using the clone_ID class.
#19
Posted 08 October 2012 - 03:01 PM
#20
Posted 08 October 2012 - 05:25 PM
Also tagged with one or more of these keywords: section, clone, ID
Section API - Font Size and ColorStarted by webgrade , 31 May 2013 |
|
|
||
PageLines Framework →
Customizations →
Help with New Section to display Twitter BadgeStarted by Olly , 30 May 2013 |
|
|
||
Pagelines PostPins Section randomly deleted?Started by brightonkeller , 12 May 2013 |
|
|
||
Section vanished - Help!Started by glynt , 08 May 2013 |
|
|
||
PageLines Framework →
Customizations →
section inside a sectionStarted by swoda , 18 Apr 2013 |
|
|











