:: x|x|x :: what is that?

Questions and answers about ShopSite Custom Templates

:: x|x|x :: what is that?

Postby truesdell » Fri Feb 08, 2013 12:01 am

I've inherited a site which was not put together very well.
In the process of cleaning up stuff I've come across code that looks like this:
Code: Select all
Gadgets|Gizmos|Gee-Gaws|Widgets :: x|x|x|x ::

I've been searching high and low for documentation on this, to no avail.
Can someone please point me in the right direction for documentation?
What does this code do, exactly?

Thanks for any insights.
truesdell
 
Posts: 18
Joined: Thu Jan 10, 2013 12:33 am

Re: :: x|x|x :: what is that?

Postby Jim » Fri Feb 08, 2013 9:44 am

The | character is typically used as the "in field" delimiter , for example if you have multiple pages assigned to a single page you would have something like pagename1|pagename2|pagename3 etc. I'm not sure what the :: would be for.

for products where there is also an sku available in addition to the name it would take the format name ~ (tilde character) sku so like this
name~sku|name1~sku1|name2~sku2

You might also run into a |n| which would represent a linefeed in the data for things like order optons
Red
green
blue

in an upload file would be Red|n|green|n|blue
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: :: x|x|x :: what is that?

Postby truesdell » Fri Feb 08, 2013 9:45 pm

Is there a document which mentions 'in field delimiters'?

Is this mentioned in the Custom Templates docs?
truesdell
 
Posts: 18
Joined: Thu Jan 10, 2013 12:33 am

Re: :: x|x|x :: what is that?

Postby Jim » Sat Feb 09, 2013 8:57 am

http://shopsite.com/help/11.2/en-US/sc/pro/database.upload.file.html and http://shopsite.com/help/11.2/en-US/sc/pro/upload.fields.html mention the delimiters.

The delimiters are associated with the uploading of data to ShopSite. They don't have any direct connection with custom templates since templates get their data using the various template tags eg [-- product.somefield --]or [-- page.somefield --] etc and the data should never be passed to the template with the | or |n|.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: :: x|x|x :: what is that?

Postby truesdell » Mon Feb 11, 2013 11:01 pm

I've mentioned that I inherited this site and I keep running into instances where they've "left the reservation."

I'm getting those delimiters in Page Text fields. :shock:
I'm trying to forensically discover what they were trying to do.
truesdell
 
Posts: 18
Joined: Thu Jan 10, 2013 12:33 am


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 11 guests

cron