We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Simple Looping Through a Publish or Edit Page for fields

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
18 years ago
Ryan M.'s avatar Ryan M.

I hate asking for straight up help like this, but I’m stumped. Can someone enlighten me so I can finish a certain extension: If I wanted to loop through a Publish page that might have 3 textareas that have a “Smileys” and a “Glossary ” link underneath, and I wanted to remove said links, (the entire code of that section looking like the following, although the ID’s can change!)

<span class='lightLinks'> <a href="[removed]void(0);"  false;">
<b>Check Spelling</b></a>    |     
<a href="[removed]void(0);" onclick="showhide_glossary('4');return false;">
<b>Glossary</b></a>    |     
<a href="[removed]void(0);" onclick="showhide_smileys('4');return false;">
<b>Smileys</b></a>    |    </span>

Dangit those links should have classes or something! How might I go about searching for each section of links on that page an return the following (again: someone wants to remove the “Glossary” and “Smileys” links):

<span class='lightLinks'> <a href="[removed]void(0);"  false;">
<b>Check Spelling</b></a>    |    </span>

That’s all I need to do. I’m working on my “Hide Smileys” extension, but AJP had to go and get all complicated and ask if it was possible to make Spelling, Glossary, and Smileys independent selections. Might be a little overkill, but would be fun to accomplish. The extension currently hides the Smileys link only. Shoulod I put in a Feature request to give these links classes? Everything in the CP should be classed or ID’ed where possible!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.